Skip AOT in plugin when pkg contains ni files accepted/tizen_unified_toolchain accepted/tizen_unified_x_asan accepted/tizen/unified/20240723.101927 accepted/tizen/unified/dev/20240724.110029 accepted/tizen/unified/toolchain/20240812.133515 accepted/tizen/unified/x/20240724.011735 accepted/tizen/unified/x/asan/20240813.231958
authorWoongsuk Cho <ws77.cho@samsung.com>
Thu, 18 Jul 2024 06:14:25 +0000 (15:14 +0900)
committer조웅석/MDE Lab(SR)/삼성전자 <ws77.cho@samsung.com>
Tue, 23 Jul 2024 00:02:56 +0000 (09:02 +0900)
NativeLauncher/installer-plugin/prefer_dotnet_aot_plugin.cc

index 427eb63..75bb2f9 100644 (file)
@@ -72,6 +72,15 @@ extern "C" int PKGMGR_MDPARSER_PLUGIN_INSTALL(const char *pkgId, const char *app
                iter = g_list_next(iter);
        }
 
+       // if package contains native image, skip AOT.
+       std::string rootPath = getRootPath(pkgId);
+       if (!rootPath.empty()) {
+               if (exist(concatPath(rootPath, concatPath("bin", APP_NI_SUB_DIR)))) {
+                       _INFO("Package already contains native images. Skip native image generation");
+                       doAOT = false;
+               }
+       }
+
        if (doAOT) {
                _DBG("Prefer dotnet application AOT set TRUE");