Skip to content

Commit

Permalink
Add cross-os DAC builds as subsets.
Browse files Browse the repository at this point in the history
Clean up build-runtime parameters and passing the official build ID from runtime.proj.
  • Loading branch information
jkoritzinsky committed Mar 3, 2020
1 parent a6b4ac4 commit 8b7982d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 19 deletions.
14 changes: 13 additions & 1 deletion eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<DefaultInstallerSubsets>corehost-managed-depproj-pkgproj-bundle-installers-test</DefaultInstallerSubsets>
<!-- TODO: Split into multiple sets. -->
<DefaultLibrariesSubsets>all</DefaultLibrariesSubsets>
<DefaultCoreClrSubsets>runtime-corelib-nativecorelib-tools-packages</DefaultCoreClrSubsets>
<DefaultCoreClrSubsets>runtime-linuxdac-corelib-nativecorelib-tools-packages</DefaultCoreClrSubsets>
<DefaultMonoSubsets>all</DefaultMonoSubsets>

<_subsetCategory Condition="'$(SubsetCategory)' != ''">$(SubsetCategory.ToLowerInvariant())</_subsetCategory>
Expand All @@ -85,6 +85,8 @@

<!-- CoreClr -->
<SubsetName Include="Runtime" Category="CoreClr" Description="The CoreCLR .NET runtime." />
<SubsetName Condition="$([MSBuild]::IsOsPlatform(Windows))" Include="LinuxDac" Category="CoreClr" Description="The cross-OS Windows->libc-based Linux DAC." />
<SubsetName Condition="$([MSBuild]::IsOsPlatform(Windows))" Include="AlpineDac" Category="CoreClr" OnDemand="true" Description="The cross-OS Windows->musl-libc-based Linux DAC." />
<SubsetName Include="CoreLib" Category="CoreClr" Description="The managed System.Private.CoreLib library for CoreCLR." />
<SubsetName Include="NativeCoreLib" Category="CoreClr" Description="Run crossgen on System.Private.CoreLib library for CoreCLR." />
<SubsetName Include="Tools" Category="CoreClr" Description="Managed tools that support CoreCLR development and testing." />
Expand Down Expand Up @@ -150,6 +152,16 @@
<ProjectToBuild Include="@(CoreClrProjectToBuild)" />
</ItemGroup>

<ItemGroup Condition="$(_subsetCategory.Contains('coreclr')) and $(_subset.Contains('-linuxdac-')) and $([MSBuild]::IsOsPlatform(Windows))">
<CoreClrLinuxDacProjectToBuild Include="$(CoreClrProjectRoot)runtime.proj" BuildInParallel="false" AdditionalProperties="%(AdditionalProperties);CrossDac=linux" />
<ProjectToBuild Include="@(CoreClrLinuxDacProjectToBuild)" />
</ItemGroup>

<ItemGroup Condition="$(_subsetCategory.Contains('coreclr')) and $(_subset.Contains('-alpinedac-')) and $([MSBuild]::IsOsPlatform(Windows))">
<CoreClrAlpineLinuxDacProjectToBuild Include="$(CoreClrProjectRoot)runtime.proj" BuildInParallel="false" AdditionalProperties="%(AdditionalProperties);CrossDac=alpine" />
<ProjectToBuild Include="@(CoreClrAlpineLinuxDacProjectToBuild)" />
</ItemGroup>

<ItemGroup Condition="$(_subsetCategory.Contains('coreclr')) and $(_subset.Contains('-nativecorelib-'))">
<CoreClrNativeCoreLibProjectToBuild Include="$(CoreClrProjectRoot)crossgen-corelib.proj" BuildInParallel="false" />
<ProjectToBuild Include="@(CoreClrNativeCoreLibProjectToBuild)" />
Expand Down
6 changes: 0 additions & 6 deletions src/coreclr/build-runtime.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,6 @@ if /i "%1" == "-usenmakemakefiles" (set __NMakeMakefiles=1&set __ConfigureOnly
if /i "%1" == "-pgoinstrument" (set __PgoInstrument=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "-enforcepgo" (set __EnforcePgo=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "-nopgooptimize" (set __PgoOptimize=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "-ibcinstrument" (set __IbcTuning=/Tuning&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "-crossgenaltjit" (set __CrossgenAltJit=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)

REM TODO these are deprecated remove them eventually
REM don't add more, use the - syntax instead
Expand All @@ -175,8 +173,6 @@ if /i "%1" == "usenmakemakefiles" (set __NMakeMakefiles=1&set __ConfigureOnly=
if /i "%1" == "pgoinstrument" (set __PgoInstrument=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "nopgooptimize" (set __PgoOptimize=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "enforcepgo" (set __EnforcePgo=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "ibcinstrument" (set __IbcTuning=/Tuning&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "crossgenaltjit" (set __CrossgenAltJit=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
REM TODO remove this once it's no longer used in buildpipeline
if /i "%1" == "--" (set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)

Expand Down Expand Up @@ -676,7 +672,6 @@ echo Build type: one of -Debug, -Checked, -Release ^(default: -Debug^).
echo -nopgooptimize: do not use profile guided optimizations.
echo -enforcepgo: verify after the build that PGO was used for key DLLs, and fail the build if not
echo -pgoinstrument: generate instrumented code for profile guided optimization enabled binaries.
echo -ibcinstrument: generate IBC-tuning-enabled native images when invoking crossgen.
echo -configureonly: skip all builds; only run CMake ^(default: CMake and builds are run^)
echo -skipconfigure: skip CMake ^(default: CMake is run^)
echo -skipnative: skip building native components ^(default: native components are built^).
Expand All @@ -686,7 +681,6 @@ echo -skiprestoreoptdata: skip restoring optimization data used by profile-based
echo -skiprestore: skip restoring packages ^(default: packages are restored during build^).
echo -priority=^<N^> : specify a set of test that will be built and run, with priority N.
echo -officialbuildid=^<ID^>: specify the official build ID to be used by this build.

This comment has been minimized.

Copy link
@hoyosjs

hoyosjs Mar 3, 2020

Member

Are we still passing the official build id here? We were not adding the key into the passthrough values before, so it's either that, or just ripping this off.

This comment has been minimized.

Copy link
@jkoritzinsky

jkoritzinsky Mar 3, 2020

Author Member

This is just leftover invalid docs. I'll remove this line.

echo -crossgenaltjit ^<JIT dll^>: run crossgen using specified altjit ^(used for JIT testing^).
echo portable : build for portable RID.
echo.
echo If "all" is specified, then all build architectures and types are built. If, in addition,
Expand Down
11 changes: 0 additions & 11 deletions src/coreclr/build-runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@ fi
export PYTHON

usage_list+=("-nopgooptimize: do not use profile guided optimizations.")
usage_list+=("-officialbuildid=^<ID^>: specify the official build ID to be used by this build.")
usage_list+=("-pgoinstrument: generate instrumented code for profile guided optimization enabled binaries.")
usage_list+=("-skipcrossarchnative: Skip building cross-architecture native binaries.")
usage_list+=("-skipmanagedtools: generate instrumented code for profile guided optimization enabled binaries.")
usage_list+=("-skiprestore: specify the official build ID to be used by this build.")
usage_list+=("-skiprestoreoptdata: skip restoring optimization data.")
usage_list+=("-staticanalyzer: skip native image generation.")

Expand Down Expand Up @@ -105,10 +102,6 @@ build_cross_architecture_components()
handle_arguments_local() {
case "$1" in

disableoss|-disableoss)
__SignTypeArg="/p:SignType=real"
;;

ignorewarnings|-ignorewarnings)
__IgnoreWarnings=1
__CMakeArgs="-DCLR_CMAKE_WARNINGS_ARE_ERRORS=OFF $__CMakeArgs"
Expand All @@ -127,10 +120,6 @@ handle_arguments_local() {
__SkipCrossArchNative=1
;;

skiprestore|-skiprestore)
__SkipRestoreArg="/p:RestoreDuringBuild=false"
;;

staticanalyzer|-staticanalyzer)
__StaticAnalyzer=1
;;
Expand Down
3 changes: 2 additions & 1 deletion src/coreclr/runtime.proj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
<_CoreClrBuildArg Condition="'$(CrossBuild)' == 'true'" Include="-cross" />
<_CoreClrBuildArg Condition="$([MSBuild]::IsOsPlatform(Windows)) and ('$(TargetArchitecture)' == 'x86' or '$(TargetArchitecture)' == 'x64') and '$(Configuration)' == 'Release'" Include="-enforcepgo" />
<_CoreClrBuildArg Condition="!$([MSBuild]::IsOsPlatform(Windows)) and '$(Configuration)' == 'Release'" Include="-stripsymbols" />
<_CoreClrBuildArg Condition="'$(OfficialBuildId)' != ''" Include="-officialbuildid=$(OfficialBuildId)" />
<_CoreClrBuildArg Condition="$([MSBuild]::IsOsPlatform(Windows)) and '$(CrossDac)' != ''" Include="-$(CrossDac)dac" />
<_CoreClrBuildArg Condition="'$(OfficialBuildId)' != ''" Include="/p:OfficialBuildId=$(OfficialBuildId)" />
</ItemGroup>

<PropertyGroup>
Expand Down

0 comments on commit 8b7982d

Please sign in to comment.