diff options
-rwxr-xr-x | build.sh | 22 |
1 files changed, 14 insertions, 8 deletions
@@ -387,6 +387,7 @@ isMSBuildOnNETCoreSupported() build_CoreLib_ni() { local __CrossGenExec=$1 + local __CoreLibILDir=$2 if [ $__PartialNgen == 1 ]; then export COMPlus_PartialNGen=1 @@ -396,8 +397,8 @@ build_CoreLib_ni() rm $__CrossGenCoreLibLog fi echo "Generating native image of System.Private.CoreLib.dll for $__BuildOS.$__BuildArch.$__BuildType. Logging to \"$__CrossGenCoreLibLog\"." - 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 >> $__CrossGenCoreLibLog 2>&1 + echo "$__CrossGenExec /Platform_Assemblies_Paths $__CoreLibILDir $__IbcTuning /out $__BinDir/System.Private.CoreLib.dll $__CoreLibILDir/System.Private.CoreLib.dll" + $__CrossGenExec /Platform_Assemblies_Paths $__CoreLibILDir $__IbcTuning /out $__BinDir/System.Private.CoreLib.dll $__CoreLibILDir/System.Private.CoreLib.dll >> $__CrossGenCoreLibLog 2>&1 if [ $? -ne 0 ]; then echo "Failed to generate native image for System.Private.CoreLib. Refer to $__CrossGenCoreLibLog" exit 1 @@ -472,6 +473,8 @@ build_CoreLib() return fi + local __CoreLibILDir=$__BinDir/IL + # The cross build generates a crossgen with the target architecture. if [ $__CrossBuild == 0 ]; then if [ $__SkipCoreCLR == 1 ]; then @@ -480,21 +483,24 @@ build_CoreLib() # The architecture of host pc must be same architecture with target. if [[ ( "$__HostArch" == "$__BuildArch" ) ]]; then - build_CoreLib_ni "$__BinDir/crossgen" + build_CoreLib_ni "$__BinDir/crossgen" $__CoreLibILDir elif [[ ( "$__HostArch" == "x64" ) && ( "$__BuildArch" == "x86" ) ]]; then - build_CoreLib_ni "$__BinDir/crossgen" + build_CoreLib_ni "$__BinDir/crossgen" $__CoreLibILDir elif [[ ( "$__HostArch" == "arm64" ) && ( "$__BuildArch" == "arm" ) ]]; then - build_CoreLib_ni "$__BinDir/crossgen" + build_CoreLib_ni "$__BinDir/crossgen" $__CoreLibILDir else exit 1 fi else if [[ ( "$__CrossArch" == "x86" ) && ( "$__BuildArch" == "arm" ) ]]; then - build_CoreLib_ni "$__CrossComponentBinDir/crossgen" + build_CoreLib_ni "$__CrossComponentBinDir/crossgen" $__CoreLibILDir elif [[ ( "$__CrossArch" == "x64" ) && ( "$__BuildArch" == "arm" ) ]]; then - build_CoreLib_ni "$__CrossComponentBinDir/crossgen" + build_CoreLib_ni "$__CrossComponentBinDir/crossgen" $__CoreLibILDir elif [[ ( "$__HostArch" == "x64" ) && ( "$__BuildArch" == "arm64" ) ]]; then - build_CoreLib_ni "$__CrossComponentBinDir/crossgen" + build_CoreLib_ni "$__CrossComponentBinDir/crossgen" $__CoreLibILDir + else + # Crossgen not performed, so treat the IL version as the final version + cp $__CoreLibILDir/System.Private.CoreLib.dll $__BinDir/System.Private.CoreLib.dll fi fi } |