fix long path in windows for aot

Issue: https://gitee.com/openharmony/arkcompiler_ets_frontend/issues/I6FNWW
Signed-off-by: zhouzebin <zhouzebin1@huawei.com>
Change-Id: Iade38b63478c9341cf19e91f9fb87d81f407fbe1
This commit is contained in:
zhouzebin 2023-02-21 19:31:52 +08:00
parent fd5b688455
commit 07ae251fd6
2 changed files with 9 additions and 8 deletions

View File

@ -112,8 +112,9 @@ int Main(const int argc, const char **argv)
PassManager passManager(vm, entrypoint, triple, optLevel, relocMode, &log, &logList, maxAotMethodSize,
isEnableTypeLowering, hotnessThreshold);
for (const auto &fileName : pandaFileNames) {
LOG_COMPILER(INFO) << "AOT compile: " << fileName;
if (passManager.Compile(fileName, generator, profilerIn) == false) {
auto extendedFilePath = panda::os::file::File::GetExtendedFilePath(fileName);
LOG_COMPILER(INFO) << "AOT compile: " << extendedFilePath;
if (passManager.Compile(extendedFilePath, generator, profilerIn) == false) {
ret = false;
continue;
}

View File

@ -182,9 +182,9 @@ public:
return aotOutputFile_;
}
void SetAOTOutputFile(std::string value)
void SetAOTOutputFile(const std::string& value)
{
aotOutputFile_ = std::move(value);
aotOutputFile_ = panda::os::file::File::GetExtendedFilePath(value);
}
bool WasAOTOutputFileSet() const
@ -603,9 +603,9 @@ public:
printAnyTypes_ = value;
}
void SetBuiltinsDTS(std::string value)
void SetBuiltinsDTS(const std::string& value)
{
builtinsDTS_ = std::move(value);
builtinsDTS_ = panda::os::file::File::GetExtendedFilePath(value);
}
bool WasSetBuiltinsDTS() const
@ -809,9 +809,9 @@ public:
return pgoProfilerPath_;
}
void SetPGOProfilerPath(std::string value)
void SetPGOProfilerPath(const std::string& value)
{
pgoProfilerPath_ = std::move(value);
pgoProfilerPath_ = panda::os::file::File::GetExtendedFilePath(value);
}
void SetEnableTypeLowering(bool value)