diff options
author | Michelle McDaniel <adiaaida@gmail.com> | 2018-10-24 13:53:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-24 13:53:42 -0700 |
commit | ebc4bde180020a252e681cec44956fda18afdb8c (patch) | |
tree | f88c95b141168c2f2bc9c70c0f510a3288485fa8 /build.sh | |
parent | 11c5d6cea57bffd86778fec8da62d3e3f9b1afa2 (diff) | |
download | coreclr-ebc4bde180020a252e681cec44956fda18afdb8c.tar.gz coreclr-ebc4bde180020a252e681cec44956fda18afdb8c.tar.bz2 coreclr-ebc4bde180020a252e681cec44956fda18afdb8c.zip |
Run IBCMerge step for Linux on Windows (#20496)
This change does the following:
* Move the IBCOptimize step out of the Crossgen section and into the CoreLib build section of build.cmd
* Adds -ibconly which will skip building System.Private.CoreLib and only run the ibcmerge step
* Adds crossgenonly and partialngen flags to build.sh
These three changes facilitate our ability to apply IBC data to Linux assemblies on Windows and the perform the crossgen step on Linux, which will be our flow for official builds when we want to apply IBC data since IBCMerge cannot run on non-Windows platforms
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 23 |
1 files changed, 22 insertions, 1 deletions
@@ -48,6 +48,8 @@ usage() echo "-skipnuget - skip building nuget packages." echo "-skiprestoreoptdata - skip restoring optimization data used by profile-based optimizations." echo "-skipcrossgen - skip native image generation" + echo "-crossgenonly - only run native image generation" + echo "-partialngen - build CoreLib as PartialNGen" echo "-verbose - optional argument to enable verbose build output." echo "-skiprestore: skip restoring packages ^(default: packages are restored during build^)." echo "-disableoss: Disable Open Source Signing for System.Private.CoreLib." @@ -428,6 +430,10 @@ build_CoreLib_ni() { local __CrossGenExec=$1 + if [ $__PartialNgen == 1 ]; then + export COMPlus_PartialNGen=1 + fi + if [ -e $__CrossGenCoreLibLog ]; then rm $__CrossGenCoreLibLog fi @@ -523,7 +529,7 @@ generate_NugetPackages() fi # Since we can build mscorlib for this OS, did we build the native components as well? - if [ $__SkipCoreCLR == 1 ]; then + if [[ $__SkipCoreCLR == 1 && $__CrossgenOnly == 0 ]]; then echo "Unable to generate nuget packages since native components were not built." return fi @@ -659,6 +665,8 @@ __SkipCoreCLR=0 __SkipMSCorLib=0 __SkipRestoreOptData=0 __SkipCrossgen=0 +__CrossgenOnly=0 +__PartialNgen=0 __SkipTests=0 __CrossBuild=0 __ClangMajorVersion=0 @@ -858,6 +866,15 @@ while :; do __SkipCrossgen=1 ;; + crossgenonly|-crossgenonly) + __SkipMSCorLib=1 + __SkipCoreCLR=1 + __CrossgenOnly=1 + ;; + partialngen|-partialngen) + __PartialNgen=1 + ;; + skiptests|-skiptests) __SkipTests=1 ;; @@ -1045,6 +1062,10 @@ fi build_CoreLib +if [ $__CrossgenOnly ==1 ]; then + build_CoreLib_ni "$__BinDir/crossgen" +fi + # Generate nuget packages if [ $__SkipNuget != 1 ]; then generate_NugetPackages |