Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move MSBuild projects out of the native build scripts #31701

Merged
81 commits merged into from
Mar 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
1415bde
Move coreclr managed tools that don't need to be published and System…
jkoritzinsky Jan 29, 2020
f5657c8
Remove building System.Private.CoreLib from build scripts. Eventing s…
jkoritzinsky Jan 29, 2020
2d47605
Build packages via an Arcade subset instead of within build.cmd/build.sh
jkoritzinsky Jan 29, 2020
318989c
Remove packages and test build from build.cmd. Clean up options on bu…
jkoritzinsky Jan 29, 2020
1841ceb
Generate eventing sources for System.Private.CoreLib within MSBuild i…
jkoritzinsky Jan 29, 2020
56c0f45
Remove check-definitions.py script and supporting goo.
jkoritzinsky Jan 29, 2020
328bdab
Fix eventing generation.
jkoritzinsky Jan 30, 2020
0cd1ce3
Wire up TargetArchitecture and OSGroup to coreclr's BuildArch and Bu…
jkoritzinsky Jan 30, 2020
620718d
Stop passing down now non-existent skiptests parameter.
jkoritzinsky Jan 30, 2020
b83f3c3
Fix coreclr .nuget rid parsing to account for linux-musl correctly.
jkoritzinsky Jan 30, 2020
8c21050
Update build scripts to use Arcade to build packages.
jkoritzinsky Jan 31, 2020
d4da3d6
Merge branch 'master' of https://github.com/dotnet/runtime into hoist…
jkoritzinsky Jan 31, 2020
0c17b77
Convert from Properties to AdditionalProperties.
jkoritzinsky Jan 31, 2020
c65fc60
Build crossgen as part of Arcade (self-contained publish TBD).
jkoritzinsky Jan 31, 2020
f724a03
Pull down .NET runtime CLI for helix runs with crossgen2.
jkoritzinsky Jan 31, 2020
430db11
Output crossgen2 to the BinDir/crossgen when built from the project f…
jkoritzinsky Jan 31, 2020
6799479
Generate distro rid during windows build.
jkoritzinsky Feb 1, 2020
11371de
Various fixes to get files binplaced correctly and builds to work on …
jkoritzinsky Feb 3, 2020
f19e0e4
Merge branch 'hoist-S.P.CL' of https://github.com/jkoritzinsky/runtim…
jkoritzinsky Feb 3, 2020
8e36e86
Merge branch 'master' of https://github.com/dotnet/runtime into hoist…
jkoritzinsky Feb 3, 2020
37ea4fa
Fix search for dotnet in repo on bash.
jkoritzinsky Feb 3, 2020
03f8275
Remove __BuildTest variable and fix up the script.
jkoritzinsky Feb 4, 2020
2d119c7
Fix steps in build-job to build S.P.CL before the runtime and build m…
jkoritzinsky Feb 4, 2020
447accf
Fix casing typo.
jkoritzinsky Feb 4, 2020
13a80ad
Refactor detecting system OS and Architecture.
jkoritzinsky Feb 4, 2020
51e0f1c
Fix wasm rid calculation.
jkoritzinsky Feb 4, 2020
e652d87
Run crossgen2 on corerun so we run it on the runtime we're going to s…
jkoritzinsky Feb 4, 2020
911c736
Assemble a live self-contained publish in the crossgen2 package.
jkoritzinsky Feb 4, 2020
f8b0b2b
Fix init-os-and-arch resolution.
jkoritzinsky Feb 4, 2020
a52c8c8
Ensure that the runtime files we package in crossgen2 are the crossge…
jkoritzinsky Feb 5, 2020
e228b91
Remove extraneous /bl
jkoritzinsky Feb 5, 2020
ebd026d
Build R2RDump to a subfolder instead of the product dir.
jkoritzinsky Feb 5, 2020
293f46a
Merge branch 'hoist-S.P.CL' of E:/home/jekoritz/runtime into hoist-S.…
jkoritzinsky Feb 5, 2020
6cdc3f1
Merge branch 'master' of https://github.com/dotnet/runtime into hoist…
jkoritzinsky Feb 5, 2020
d0d937c
Seperate out the crosssgening corelib step into a separate script.
jkoritzinsky Feb 7, 2020
57fc394
Fix permissions on crossgen-corelib.sh
jkoritzinsky Feb 7, 2020
465e572
Merge branch 'master' of https://github.com/dotnet/runtime into hoist…
jkoritzinsky Feb 7, 2020
04dc07f
Rename build.cmd/sh to build-runtime.cmd/sh
jkoritzinsky Feb 7, 2020
51a3fa8
Fix parameters in crossgen2determinism test.
jkoritzinsky Feb 10, 2020
2da7fa2
Merge branch 'master' of https://github.com/dotnet/runtime into hoist…
jkoritzinsky Feb 10, 2020
f757242
Run crossgen on System.Private.CoreLib in CI.
jkoritzinsky Feb 10, 2020
2471de8
Restore original build.cmd/sh scripts with a deprecation warning and …
jkoritzinsky Feb 10, 2020
0e2a192
Initialize developer prompt in crossgen-corelib.cmd script so we can …
jkoritzinsky Feb 10, 2020
81e2176
Merge branch 'hoist-S.P.CL' of https://github.com/jkoritzinsky/runtim…
jkoritzinsky Feb 10, 2020
16915b5
Make sure vs tools are enabled so we can resolve DiaSymReader.
jkoritzinsky Feb 10, 2020
d1f8d0f
Call build-native instead of build.
jkoritzinsky Feb 10, 2020
920b521
Merge branch 'master' of https://github.com/dotnet/runtime into hoist…
jkoritzinsky Feb 10, 2020
f2a6046
Fix build-native -> build-runtime.
jkoritzinsky Feb 10, 2020
c61e6e7
Fix permissions.
jkoritzinsky Feb 11, 2020
2844721
Remove dead MSBuild code.
jkoritzinsky Feb 14, 2020
1ffe902
Factor out python locating targets to make them available to the whol…
jkoritzinsky Feb 14, 2020
3fb6ae6
PR Feedback/simplification.
jkoritzinsky Feb 14, 2020
83dce9d
Merge branch 'master' of https://github.com/dotnet/runtime into hoist…
jkoritzinsky Feb 14, 2020
80ea3d9
Merge commit '9a8bce7' into hoist-S.P.CL
jkoritzinsky Feb 20, 2020
9a0f0be
Create a self-contained deps.json for crossgen2 and add it to the pac…
jkoritzinsky Feb 21, 2020
cf1afb6
Merge branch 'master' of https://github.com/dotnet/runtime into hoist…
jkoritzinsky Feb 25, 2020
9c2c428
Pass runtimeconfiguration as configuration for crossgen2 deps file ge…
jkoritzinsky Feb 25, 2020
6e58e89
Try specifying rids directly in crossgen2 project to get the restore …
jkoritzinsky Feb 26, 2020
b8d82c0
Run crossgen2 via corerun in R2R.SuperILC.
jkoritzinsky Feb 26, 2020
591b012
Merge branch 'master' of https://github.com/dotnet/runtime into hoist…
jkoritzinsky Feb 27, 2020
2ddc248
Merge branch 'master' of https://github.com/dotnet/runtime into hoist…
jkoritzinsky Feb 28, 2020
0d48035
Add binlogs to build-runtime.cmd
jkoritzinsky Feb 28, 2020
12ba97b
Combine non build-runtime steps into a single step so we get one binl…
jkoritzinsky Feb 28, 2020
7e5bf10
Add reference to issue describing new workflow.
jkoritzinsky Feb 28, 2020
b9335e8
Quote python path
jkoritzinsky Feb 29, 2020
9f0f4d7
Set arch default.
jkoritzinsky Feb 29, 2020
cc6ddce
PR Feedback and clean up crossgen-corelib's argument list.
jkoritzinsky Mar 2, 2020
e890a9e
Fix subset name matching to work when one subset name is a substring …
jkoritzinsky Mar 2, 2020
6184bda
Pass the official build id as an msbuild arg at all times.
jkoritzinsky Mar 2, 2020
4e7714d
PR Feedback.
jkoritzinsky Mar 2, 2020
8819069
Fix default subset list construction.
jkoritzinsky Mar 2, 2020
f0a9d2a
Add deprecation warnings at beginning and end of build.cmd and build.sh.
jkoritzinsky Mar 2, 2020
1da936d
Setup dirs in crossgen-corelib.sh
jkoritzinsky Mar 2, 2020
711e38d
Move enforcepgo argument to before the official build arg so that it …
jkoritzinsky Mar 3, 2020
a6b4ac4
Merge branch 'master' of https://github.com/dotnet/runtime into hoist…
jkoritzinsky Mar 3, 2020
8b7982d
Add cross-os DAC builds as subsets.
jkoritzinsky Mar 3, 2020
6f6ec99
Update script usage docs.
jkoritzinsky Mar 3, 2020
ba67a5a
Skip the cross-os dac on x86.
jkoritzinsky Mar 3, 2020
330a860
Merge branch 'master' of https://github.com/dotnet/runtime into hoist…
jkoritzinsky Mar 3, 2020
e3ba26d
Build windows->linux cross dac on PR and CI.
jkoritzinsky Mar 3, 2020
87e3d0a
Don't build the cross-OS linux dac on Windows x86.
jkoritzinsky Mar 4, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
<ImportDirectoryBuildTargets>false</ImportDirectoryBuildTargets>
</PropertyGroup>

<Import Project="$(RepositoryEngineeringDir)/liveBuilds.targets" />
<Import Project="$(RepositoryEngineeringDir)liveBuilds.targets" />
<Import Project="$(RepositoryEngineeringDir)python.targets" />
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" Condition="'$(SkipImportArcadeSdkFromRoot)' != 'true'" />

<PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions docs/workflow/building/coreclr/linux-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ To ensure that your system can allocate enough file-handles for the libraries bu
Build the Runtime and System.Private.CoreLib
=============================================

To build the runtime on Linux, run build.sh from the root of the runtime repository:
To build the runtime on Linux, run build.sh to build the CoreCLR subset category of the runtime:

```
./src/coreclr/build.sh
./build.sh -subsetCategory coreclr
```

After the build is completed, there should some files placed in `runtime/artifacts/bin/coreclr/Linux.x64.Debug`. The ones we are most interested in are:
Expand Down
10 changes: 5 additions & 5 deletions docs/workflow/building/coreclr/osx-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ brew install icu4c
brew link --force icu4c
```

Build the Runtime and Microsoft Core Library
Build the Runtime and System.Private.CoreLib
============================================

To Build CoreCLR, run build.sh from the root of the coreclr repo.
To Build CoreCLR, run build.sh to build the CoreCLR subset category of the runtime:

```sh
./src/coreclr/build.sh
```
./build.sh -subsetCategory coreclr
```

After the build has completed, there should some files placed in `artifacts/bin/coreclr/OSX.x64.Debug`. The ones we are interested in are:
Expand Down Expand Up @@ -75,4 +75,4 @@ an environment variable to the Core_Root folder.
```sh
export CORE_ROOT=/path/to/runtime/artifacts/tests/coreclr/OSX.x64.Debug/Tests/Core_Root
$CORE_ROOT/corerun hello_world.dll
```
```
87 changes: 70 additions & 17 deletions eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,19 @@
<DefaultInstallerSubsets>corehost-managed-depproj-pkgproj-bundle-installers-test</DefaultInstallerSubsets>
<!-- TODO: Split into multiple sets. -->
<DefaultLibrariesSubsets>all</DefaultLibrariesSubsets>
<DefaultCoreClrSubsets>all</DefaultCoreClrSubsets>
<DefaultCoreClrSubsets>runtime-linuxdac-corelib-nativecorelib-tools-packages</DefaultCoreClrSubsets>
<DefaultMonoSubsets>all</DefaultMonoSubsets>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does the mono default include coreclr but not the other way around?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mono's default doesn't include CoreCLR. Mono's default includes the "all" subset in the Mono subset category. Same way that Libraries' default includes the "all" subset in the Libraries subset category.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems confusing to name it "all" then not have all the items in it. Is there some subtle, or less subtle, context I'm missing here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The “all” refers to “all projects that are in this subset category” not “all projects in dotnet/runtime”.


<_subsetCategory Condition="'$(SubsetCategory)' != ''">$(SubsetCategory.ToLowerInvariant())</_subsetCategory>
<_subsetCategory Condition="'$(SubsetCategory)' == ''">$(DefaultSubsetCategories)</_subsetCategory>
<_subset Condition="'$(Subset)' != ''">$(Subset.ToLowerInvariant())</_subset>
<_subset Condition="'$(Subset)' == '' and $(_subsetCategory.Contains('installer'))">$(DefaultInstallerSubsets)</_subset>
<_subset Condition="'$(Subset)' == '' and $(_subsetCategory.Contains('libraries'))">$(_subset)$(DefaultLibrariesSubsets)</_subset>
<_subset Condition="'$(Subset)' == '' and $(_subsetCategory.Contains('coreclr'))">$(_subset)$(DefaultCoreClrSubsets)</_subset>
<_subset Condition="'$(Subset)' == '' and $(_subsetCategory.Contains('mono'))">$(_subset)$(DefaultMonoSubsets)</_subset>
<_subset Condition="'$(Subset)' == '' and $(_subsetCategory.Contains('libraries'))">$(_subset)-$(DefaultLibrariesSubsets)</_subset>
<_subset Condition="'$(Subset)' == '' and $(_subsetCategory.Contains('coreclr'))">$(_subset)-$(DefaultCoreClrSubsets)</_subset>
<_subset Condition="'$(Subset)' == '' and $(_subsetCategory.Contains('mono'))">$(_subset)-$(DefaultMonoSubsets)</_subset>

<!-- Surround _subset in dashes to simplify checks below -->
<_subset>-$(_subset)-</_subset>
</PropertyGroup>

<ItemGroup>
Expand All @@ -81,7 +84,13 @@
<SubsetName Include="All" Category="Libraries" Description="The .NET libraries comprising the shared framework." />

<!-- CoreClr -->
<SubsetName Include="All" Category="CoreClr" Description="The .NET runtime." />
<SubsetName Include="Runtime" Category="CoreClr" Description="The CoreCLR .NET runtime." />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does Runtime mean CoreCLR instead of say Mono?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the Runtime subset within the CoreCLR subset category. Mono could change their build to have a Runtime subset and then running ./build -subset runtime would build both native runtimes.

<SubsetName Condition="$([MSBuild]::IsOsPlatform(Windows))" Include="LinuxDac" Category="CoreClr" Description="The cross-OS Windows->libc-based Linux DAC. Skipped on x86." />
<SubsetName Condition="$([MSBuild]::IsOsPlatform(Windows))" Include="AlpineDac" Category="CoreClr" OnDemand="true" Description="The cross-OS Windows->musl-libc-based Linux DAC. Skipped on x86." />
<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." />
jkoritzinsky marked this conversation as resolved.
Show resolved Hide resolved
<SubsetName Include="Tools" Category="CoreClr" Description="Managed tools that support CoreCLR development and testing." />
<SubsetName Include="Packages" Category="CoreClr" Description="The projects that produce NuGet packages for the CoreCLR runtime, crossgen, and IL tools." />

<!-- Mono -->
<SubsetName Include="All" Category="Mono" Description="The Mono .NET runtime." />
Expand All @@ -98,14 +107,26 @@
</ItemGroup>

<!-- Global sets -->
<ItemGroup Condition="$(_subset.Contains('regeneratereadmetable'))">
<ItemGroup Condition="$(_subset.Contains('-regeneratereadmetable-'))">
<ProjectToBuild Include="$(RepoToolsLocalDir)regenerate-readme-table.proj" />
</ItemGroup>

<ItemDefinitionGroup Condition="'$(CoreCLRConfiguration)' != ''">
<CoreClrProjectToBuild>
<AdditionalProperties>Configuration=$(CoreCLRConfiguration)</AdditionalProperties>
</CoreClrProjectToBuild>
<CoreClrCoreLibProjectToBuild>
<AdditionalProperties>Configuration=$(CoreCLRConfiguration)</AdditionalProperties>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we using $(CoreCLRConfiguration) here instead of say $(RuntimeConfiguration)? Having a configuration per runtime is only useful if say we can have a build where we do Mono Debug, CoreCLR Release. Is that a supported scenario?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is done to match the above lines for CoreClrProjectToBuild to be consistent.

</CoreClrCoreLibProjectToBuild>
<CoreClrNativeCoreLibProjectToBuild>
<AdditionalProperties>Configuration=$(CoreCLRConfiguration)</AdditionalProperties>
</CoreClrNativeCoreLibProjectToBuild>
<CoreClrManagedToolsProjectToBuild>
<AdditionalProperties>Configuration=$(CoreCLRConfiguration)</AdditionalProperties>
</CoreClrManagedToolsProjectToBuild>
<CoreClrPackagesProjectToBuild>
<AdditionalProperties>Configuration=$(CoreCLRConfiguration)</AdditionalProperties>
</CoreClrPackagesProjectToBuild>
</ItemDefinitionGroup>

<ItemDefinitionGroup Condition="'$(MonoConfiguration)' != ''">
Expand All @@ -121,58 +142,90 @@
</ItemDefinitionGroup>

<!-- CoreClr sets -->
<ItemGroup Condition="$(_subsetCategory.Contains('coreclr')) and $(_subset.Contains('all'))">
<CoreClrProjectToBuild Include="$(CoreClrProjectRoot)coreclr.proj" BuildInParallel="false" />
<ItemGroup Condition="$(_subsetCategory.Contains('coreclr')) and $(_subset.Contains('-corelib-'))">
<CoreClrCoreLibProjectToBuild Include="$(CoreClrProjectRoot)src\System.Private.CoreLib\System.Private.CoreLib.csproj" BuildInParallel="false" />
<ProjectToBuild Include="@(CoreClrCoreLibProjectToBuild)" />
</ItemGroup>

<ItemGroup Condition="$(_subsetCategory.Contains('coreclr')) and $(_subset.Contains('-runtime-'))">
<CoreClrProjectToBuild Include="$(CoreClrProjectRoot)runtime.proj" BuildInParallel="false" />
<ProjectToBuild Include="@(CoreClrProjectToBuild)" />
</ItemGroup>

<ItemGroup Condition="$(_subsetCategory.Contains('coreclr')) and $(_subset.Contains('-linuxdac-')) and $([MSBuild]::IsOsPlatform(Windows)) and '$(TargetArchitecture)' != 'x86'">
<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)) and '$(TargetArchitecture)' != 'x86'">
<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)" />
</ItemGroup>

<ItemGroup Condition="$(_subsetCategory.Contains('coreclr')) and $(_subset.Contains('-tools-'))">
<CoreClrManagedToolsProjectToBuild Include="$(CoreClrProjectRoot)src\tools\runincontext\runincontext.csproj" />
<CoreClrManagedToolsProjectToBuild Include="$(CoreClrProjectRoot)src\tools\r2rdump\R2RDump.csproj" />
<CoreClrManagedToolsProjectToBuild Include="$(CoreClrProjectRoot)src\tools\ReadyToRun.SuperIlc\ReadyToRun.SuperIlc.csproj" />
<CoreClrManagedToolsProjectToBuild Include="$(CoreClrProjectRoot)src\tools\crossgen2\crossgen2\crossgen2.csproj" BuildInParallel="false" />
<ProjectToBuild Include="@(CoreClrManagedToolsProjectToBuild)" />
</ItemGroup>

<ItemGroup Condition="$(_subsetCategory.Contains('coreclr')) and $(_subset.Contains('-packages-'))">
<CoreClrPackagesProjectToBuild Include="$(CoreClrProjectRoot)src\.nuget\packages.builds" BuildInParallel="false" />
<ProjectToBuild Include="@(CoreClrPackagesProjectToBuild)" />
</ItemGroup>
<!-- Mono sets -->
<ItemGroup Condition="$(_subsetCategory.Contains('mono')) and $(_subset.Contains('all'))">
<ItemGroup Condition="$(_subsetCategory.Contains('mono')) and $(_subset.Contains('-all-'))">
<MonoProjectToBuild Include="$(MonoProjectRoot)mono.proj" BuildInParallel="false" />
<MonoProjectToBuild Include="$(MonoProjectRoot)netcore\System.Private.CoreLib\System.Private.CoreLib.csproj" BuildInParallel="false" />
<ProjectToBuild Include="@(MonoProjectToBuild)" />
</ItemGroup>

<!-- Libraries sets -->
<ItemGroup Condition="$(_subsetCategory.Contains('libraries')) and $(_subset.Contains('all'))">
<ItemGroup Condition="$(_subsetCategory.Contains('libraries')) and $(_subset.Contains('-all-'))">
<LibrariesProjectToBuild Include="$(LibrariesProjectRoot)build.proj" BuildInParallel="false" />
<ProjectToBuild Include="@(LibrariesProjectToBuild)" />
</ItemGroup>

<!-- Installer sets -->
<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('corehost'))">
<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('-corehost-'))">
<CorehostProjectToBuild Include="$(InstallerProjectRoot)corehost\build.proj" SignPhase="Binaries" />
<ProjectToBuild Include="@(CorehostProjectToBuild)" />
</ItemGroup>

<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('managed'))">
<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('-managed-'))">
<ManagedProjectToBuild Include="$(InstallerProjectRoot)managed\**\*.csproj" SignPhase="Binaries" />
<ManagedProjectToBuild Include="$(InstallerProjectRoot)pkg\packaging\pack-managed.proj" />
<ProjectToBuild Include="@(ManagedProjectToBuild)" />
</ItemGroup>

<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('depproj'))">
<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('-depproj-'))">
<DepprojProjectToBuild Include="$(InstallerProjectRoot)pkg\projects\**\*.depproj" SignPhase="R2RBinaries" BuildInParallel="false" />
<ProjectToBuild Include="@(DepprojProjectToBuild)" />
</ItemGroup>

<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('pkgproj'))">
<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('-pkgproj-'))">
<PkgprojProjectToBuild Include="$(InstallerProjectRoot)pkg\projects\**\*.pkgproj" SignPhase="MsiFiles" BuildInParallel="false" />
<ProjectToBuild Include="@(PkgprojProjectToBuild)" />
</ItemGroup>

<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('bundle'))">
<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('-bundle-'))">
<BundleProjectToBuild Include="$(InstallerProjectRoot)pkg\projects\**\*.bundleproj" SignPhase="BundleInstallerFiles" BuildInParallel="false" />
<ProjectToBuild Include="@(BundleProjectToBuild)" />
</ItemGroup>

<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('installers'))">
<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('-installers-'))">
<InstallerProjectToBuild Include="$(InstallerProjectRoot)pkg\packaging\installers.proj" BuildInParallel="false" />
<InstallerProjectToBuild Include="$(InstallerProjectRoot)pkg\packaging\vs-insertion-packages.proj" BuildInParallel="false" />
<ProjectToBuild Include="@(InstallerProjectToBuild)" />
</ItemGroup>

<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('test'))">
<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('-test-'))">
<TestProjectToBuild Include="$(InstallerProjectRoot)test\Microsoft.NET.HostModel.Tests\AppHost.Bundle.Tests\AppHost.Bundle.Tests.csproj" />
<TestProjectToBuild Include="$(InstallerProjectRoot)test\Microsoft.NET.HostModel.Tests\Microsoft.NET.HostModel.AppHost.Tests\Microsoft.NET.HostModel.AppHost.Tests.csproj" />
<TestProjectToBuild Include="$(InstallerProjectRoot)test\Microsoft.NET.HostModel.Tests\Microsoft.NET.HostModel.Bundle.Tests\Microsoft.NET.HostModel.Bundle.Tests.csproj" />
Expand Down
6 changes: 4 additions & 2 deletions eng/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Param(
[switch]$allconfigurations,
[switch]$coverage,
[string]$testscope,
[string]$arch,
[string]$arch = [System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant(),
[string]$subsetCategory,
[string]$subset,
[ValidateSet("Debug","Release","Checked")][string]$runtimeConfiguration,
Expand Down Expand Up @@ -146,11 +146,13 @@ foreach ($argument in $PSBoundParameters.Keys)
"framework" { $arguments += " /p:BuildTargetFramework=$($PSBoundParameters[$argument].ToLowerInvariant())" }
"os" { $arguments += " /p:OSGroup=$($PSBoundParameters[$argument])" }
"allconfigurations" { $arguments += " /p:BuildAllConfigurations=true" }
"arch" { $arguments += " /p:ArchGroup=$($PSBoundParameters[$argument]) /p:TargetArchitecture=$($PSBoundParameters[$argument])" }
"arch" { $arch = $PSBoundParameters[$argument]; $arguments += " /p:ArchGroup=$arch /p:TargetArchitecture=$arch" }
"properties" { $arguments += " " + $properties }
default { $arguments += " /p:$argument=$($PSBoundParameters[$argument])" }
}
}

$env:__DistroRid="win-$arch"
jkoritzinsky marked this conversation as resolved.
Show resolved Hide resolved

Invoke-Expression "& `"$PSScriptRoot/common/build.ps1`" $arguments"
exit $lastExitCode
27 changes: 27 additions & 0 deletions eng/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,35 @@ usage()
echo "Arguments can also be passed in with a single hyphen."
}

initDistroRid()
{
source $scriptroot/native/init-distro-rid.sh

local passedRootfsDir=""
local buildOs="$1"
local buildArch="$2"
local isCrossBuild="$3"
# For RID calculation purposes, say we are always a portable build
# All of our packages that use the distro rid (CoreCLR packages) are portable.
local isPortableBuild=1
jkoritzinsky marked this conversation as resolved.
Show resolved Hide resolved

# Only pass ROOTFS_DIR if __DoCrossArchBuild is specified.
if (( isCrossBuild == 1 )); then
passedRootfsDir=${ROOTFS_DIR}
fi
initDistroRidGlobal ${buildOs} ${buildArch} ${isPortableBuild} ${passedRootfsDir}
}

arguments=''
cmakeargs=''
extraargs=''
build=false
buildtests=false
subsetCategory=''
checkedPossibleDirectoryToBuild=false
crossBuild=0

source $scriptroot/native/init-os-and-arch.sh

# Check if an action is passed in
declare -a actions=("r" "restore" "b" "build" "buildtests" "rebuild" "t" "test" "pack" "sign" "publish" "clean")
Expand All @@ -89,6 +111,7 @@ while [[ $# > 0 ]]; do
shift 2
;;
-arch)
arch=$2
arguments="$arguments /p:ArchGroup=$2 /p:TargetArchitecture=$2"
shift 2
;;
Expand All @@ -103,6 +126,7 @@ while [[ $# > 0 ]]; do
shift 2
;;
-os)
os=$2
arguments="$arguments /p:OSGroup=$2"
shift 2
;;
Expand Down Expand Up @@ -141,6 +165,7 @@ while [[ $# > 0 ]]; do
shift 2
;;
-cross)
crossBuild=1
arguments="$arguments /p:CrossBuild=True"
shift 1
;;
Expand Down Expand Up @@ -187,6 +212,8 @@ if [ ${#actInt[@]} -eq 0 ]; then
arguments="-restore -build $arguments"
fi

initDistroRid $os $arch $crossBuild

# URL-encode space (%20) to avoid quoting issues until the msbuild call in /eng/common/tools.sh.
# In *proj files (XML docs), URL-encoded string are rendered in their decoded form.
cmakeargs="${cmakeargs// /%20}"
Expand Down
Loading