summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorAaron Robinson <arobins@microsoft.com>2019-05-08 15:12:11 -0700
committerGitHub <noreply@github.com>2019-05-08 15:12:11 -0700
commit01c07296189e9dc2290f79981eb2a1968c445c38 (patch)
treedd02e76561089e252ebe49c06992e2a017cbbf61 /build.sh
parente682619de596282b30c21d624716b7a3d1f2541b (diff)
downloadcoreclr-01c07296189e9dc2290f79981eb2a1968c445c38.tar.gz
coreclr-01c07296189e9dc2290f79981eb2a1968c445c38.tar.bz2
coreclr-01c07296189e9dc2290f79981eb2a1968c445c38.zip
Fix scenarios where SPCL is not crossgen'd and the output is not in the bin directory (#24477)
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh22
1 files changed, 14 insertions, 8 deletions
diff --git a/build.sh b/build.sh
index 3324524d49..a07f06af68 100755
--- a/build.sh
+++ b/build.sh
@@ -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
}