From 4815801fb95b1cc086d4f1dc6e6b671f80767451 Mon Sep 17 00:00:00 2001 From: "j-h.choi" Date: Thu, 22 Feb 2024 10:00:32 +0900 Subject: [PATCH] Fixed TAC related bugs caused by function integration patch Change-Id: Ib274591f120e7d8ed89b568c67de042cba21e07a --- NativeLauncher/tool/ni_common.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/NativeLauncher/tool/ni_common.cc b/NativeLauncher/tool/ni_common.cc index bacf923..f7b69ad 100644 --- a/NativeLauncher/tool/ni_common.cc +++ b/NativeLauncher/tool/ni_common.cc @@ -973,8 +973,11 @@ ni_error_e createNIUnderTAC(const std::string& targetPath, const std::string& re { ni_error_e ret; + // NI fils of TAC-related dlls under /opt/usr/dotnet should not be created under .native_image directory. + // So, unset NI_FLAGS_APPNI temporally and restore it after running AOT. bool isAppNI = false; if (opt->flags & NI_FLAGS_APPNI) { + opt->flags &= ~NI_FLAGS_APPNI; isAppNI = true; } @@ -1006,19 +1009,14 @@ ni_error_e createNIUnderTAC(const std::string& targetPath, const std::string& re } if (!needNIList.empty()) { - // NI fils of TAC-related dlls under /opt/usr/dotnet should not be created under .native_image directory. - // So, unset NI_FLAGS_APPNI temporally and restore it after running AOT. - opt->flags &= ~NI_FLAGS_APPNI; ret = doAOTList(needNIList, refPaths, opt); - if (isAppNI) { - opt->flags |= NI_FLAGS_APPNI; - } if (ret != NI_ERROR_NONE) { return ret; } } if (isAppNI) { + opt->flags |= NI_FLAGS_APPNI; for (auto &niPath : niList) { if (exist(niPath)) { std::string symNIPath = concatPath(targetPath, getFileName(niPath)); -- 2.7.4