From: Egor Chesakov Date: Sat, 24 Mar 2018 03:17:59 +0000 (-0700) Subject: Generate native image for System.Private.CoreLib.dll during Linux/arm build.sh (... X-Git-Tag: accepted/tizen/unified/20190422.045933~2524 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cf27269bdb565ab914bb2e6d60829ec009e339bf;p=platform%2Fupstream%2Fcoreclr.git Generate native image for System.Private.CoreLib.dll during Linux/arm build.sh (#17157) * Add generating native image for System.Private.CoreLib.dll during Linux/arm cross build when __CrossArch/__BuildArch is x86/arm --- diff --git a/build.sh b/build.sh index 8516894..d6c1be5 100755 --- a/build.sh +++ b/build.sh @@ -394,34 +394,29 @@ isMSBuildOnNETCoreSupported() build_CoreLib_ni() { - if [ $__SkipCrossgen == 1 ]; then - echo "Skipping generating native image" - return + local __CrossGenExec=$1 + + echo "Generating native image for System.Private.CoreLib.dll" + echo "$__CrossGenExec /Platform_Assemblies_Paths $__BinDir/IL $__IbcTuning /out $__BinDir/System.Private.CoreLib.dll $__BinDir/IL/System.Private.CoreLib.dll" + $__CrossGenExec /Platform_Assemblies_Paths $__BinDir/IL $__IbcTuning /out $__BinDir/System.Private.CoreLib.dll $__BinDir/IL/System.Private.CoreLib.dll + if [ $? -ne 0 ]; then + echo "Failed to generate native image for System.Private.CoreLib." + exit 1 fi - if [ $__SkipCoreCLR == 0 -a -e $__BinDir/crossgen ]; then - echo "Generating native image for System.Private.CoreLib." - echo "$__BinDir/crossgen /Platform_Assemblies_Paths $__BinDir/IL $__IbcTuning /out $__BinDir/System.Private.CoreLib.dll $__BinDir/IL/System.Private.CoreLib.dll" - $__BinDir/crossgen /Platform_Assemblies_Paths $__BinDir/IL $__IbcTuning /out $__BinDir/System.Private.CoreLib.dll $__BinDir/IL/System.Private.CoreLib.dll + if [ "$__BuildOS" == "Linux" ]; then + echo "Generating symbol file for System.Private.CoreLib.dll" + echo "$__CrossGenExec /Platform_Assemblies_Paths $__BinDir /CreatePerfMap $__BinDir $__BinDir/System.Private.CoreLib.dll" + $__CrossGenExec /Platform_Assemblies_Paths $__BinDir /CreatePerfMap $__BinDir $__BinDir/System.Private.CoreLib.dll if [ $? -ne 0 ]; then - echo "Failed to generate native image for System.Private.CoreLib." + echo "Failed to generate symbol file for System.Private.CoreLib." exit 1 fi - - if [ "$__BuildOS" == "Linux" ]; then - echo "Generating symbol file for System.Private.CoreLib." - $__BinDir/crossgen /CreatePerfMap $__BinDir $__BinDir/System.Private.CoreLib.dll - if [ $? -ne 0 ]; then - echo "Failed to generate symbol file for System.Private.CoreLib." - exit 1 - fi - fi fi } build_CoreLib() { - if [ $__isMSBuildOnNETCoreSupported == 0 ]; then echo "System.Private.CoreLib.dll build unsupported." return @@ -447,18 +442,31 @@ build_CoreLib() exit 1 fi + if [ $__SkipCrossgen == 1 ]; then + echo "Skipping generating native image" + return + fi + # The cross build generates a crossgen with the target architecture. - if [ $__CrossBuild != 1 ]; then + if [ $__CrossBuild == 0 ]; then + if [ $__SkipCoreCLR == 1 ]; then + return + fi + # The architecture of host pc must be same architecture with target. if [[ ( "$__HostArch" == "$__BuildArch" ) ]]; then - build_CoreLib_ni + build_CoreLib_ni "$__BinDir/crossgen" elif [[ ( "$__HostArch" == "x64" ) && ( "$__BuildArch" == "x86" ) ]]; then - build_CoreLib_ni + build_CoreLib_ni "$__BinDir/crossgen" elif [[ ( "$__HostArch" == "arm64" ) && ( "$__BuildArch" == "arm" ) ]]; then - build_CoreLib_ni + build_CoreLib_ni "$__BinDir/crossgen" else exit 1 fi + elif [ $__DoCrossArchBuild == 1 ]; then + if [[ ( "$__CrossArch" == "x86" ) && ( "$__BuildArch" == "arm" ) ]]; then + build_CoreLib_ni "$__CrossComponentBinDir/crossgen" + fi fi }