From: Woongsuk Cho Date: Fri, 14 Jan 2022 05:05:17 +0000 (+0900) Subject: Avoid OOM while compiling system libraries X-Git-Tag: submit/tizen/20220124.030110~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=95537874bae54d9aed010a49ab9b8adfdba3d5bf;p=platform%2Fcore%2Fdotnet%2Flauncher.git Avoid OOM while compiling system libraries If run AOTC the system library at once, it will be terminated by the OOM killer. To avoid this, run AOTC separately (netcoreapp and framework). --- diff --git a/NativeLauncher/tool/ni_common.cc b/NativeLauncher/tool/ni_common.cc index abf91d4..88fb06c 100644 --- a/NativeLauncher/tool/ni_common.cc +++ b/NativeLauncher/tool/ni_common.cc @@ -427,6 +427,8 @@ static ni_error_e crossgen2PipeLine(const std::vector& dllList, con _SOUT("Native image %s generated successfully.", niPath.c_str()); } + } else { + _SERR("Failed. Forked process terminated abnormally"); } } else { std::vector argv; @@ -486,6 +488,8 @@ static ni_error_e crossgen2NoPipeLine(const std::vector& dllList, c } _SOUT("Native image %s generated successfully.", niPath.c_str()); + } else { + _SERR("Failed. Forked process terminated abnormally"); } } else { std::vector argv; @@ -690,7 +694,12 @@ ni_error_e createNIPlatform(NIOption* opt) return ret; } - return createNIUnderDirs(__pm->getRuntimePath() + ":" + __pm->getTizenFXPath(), opt); + ret = createNIUnderDirs(__pm->getRuntimePath(), opt); + if (ret != NI_ERROR_NONE) { + return ret; + } + + return createNIUnderDirs(__pm->getTizenFXPath(), opt); } ni_error_e createNIDll(const std::string& dllPath, NIOption* opt)