diff options
author | Anirudh Agnihotry <anirudhagnihotry098@gmail.com> | 2020-03-05 18:51:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-05 18:51:06 +0300 |
commit | fef9ca70f6e7268dfc9e0f600433f5293932f166 (patch) | |
tree | 53ff21a1864acf0570ce205e3065439dc2a2ee0f | |
parent | 2f6e072c97738a56eeeb25f1fdb5dcc955649db0 (diff) |
Replacing OSGroup with TargetOS for coreclr, libraries and installer (#32833)
* Remove OSGroup from coreclr and corefx
* remove from installer
* fixing coreclr tests
* Some documentation changes
Co-Authored-By: Viktor Hofer <viktor.hofer@microsoft.com>
* moving buildos calculation to config.props
* BuildOS -> TargetOS
* remove osgroup suffix
* removing comment and correcting typo
* dotnet msbuild -> dotnet build at relevant places in docs
* moving more properties to configuration.props
* refactoring properties
* moving TargetArchitecture property to loveBuildd.Targets
* adding configuration.props to signing
* Fix installer build
* BuildOS -> Target os and removing slash
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
87 files changed, 422 insertions, 485 deletions
diff --git a/docs/coding-guidelines/interop-guidelines.md b/docs/coding-guidelines/interop-guidelines.md index 943484642f4..99a21cd308a 100644 --- a/docs/coding-guidelines/interop-guidelines.md +++ b/docs/coding-guidelines/interop-guidelines.md @@ -120,21 +120,10 @@ internal static partial class Interop // contents of Common\src\Interop\Windows\ ``` ### Build System -When building dotnet/runtime, we use the "OSGroup" property to control what target platform we are building for. The valid values for this property are Windows_NT (which is the default value from MSBuild when running on Windows), Linux and OSX. - -The build system sets a few MSBuild properties, depending on the OSGroup setting: - -* TargetsWindows -* TargetsLinux -* TargetsOSX -* TargetsUnix - -TargetsUnix is true for both OSX and Linux builds and can be used to include code that can be used on both Linux and OSX (e.g. it is written against a POSIX API that is present on both platforms). - -You should not test the value of the OSGroup property directly, instead use one of the values above. +When building dotnet/runtime, we use the "TargetOS" property to control what target platform we are building for. The valid values for this property are Windows_NT (which is the default value from MSBuild when running on Windows), Linux and OSX. #### Project Files -Whenever possible, a single .csproj should be used per assembly, spanning all target platforms, e.g. System.Console.csproj includes conditional entries for when targeting Windows vs when targeting Linux. A property can be passed to dotnet build to control which flavor is built, e.g. `dotnet build /p:OSGroup=OSX System.Console.csproj`. +Whenever possible, a single .csproj should be used per assembly, spanning all target platforms, e.g. System.Console.csproj includes conditional entries for when targeting Windows vs when targeting Linux. A property can be passed to dotnet build to control which flavor is built, e.g. `dotnet build /p:TargetOS=OSX System.Console.csproj`. ### Constants - Wherever possible, constants should be defined as "const". Only if the data type doesn't support this (e.g. IntPtr) should they instead be static readonly fields. diff --git a/docs/coding-guidelines/project-guidelines.md b/docs/coding-guidelines/project-guidelines.md index 902f62b4387..e1ede65ea60 100644 --- a/docs/coding-guidelines/project-guidelines.md +++ b/docs/coding-guidelines/project-guidelines.md @@ -6,7 +6,7 @@ once before you can iterate and work on a given library project. - Setup tools (currently done in restore in build.cmd/sh) - Restore external dependencies - - CoreCLR - Copy to `bin\runtime\$(BuildTargetFramework)-$(OSGroup)-$(Configuration)-$(ArchGroup)` + - CoreCLR - Copy to `bin\runtime\$(BuildTargetFramework)-$(TargetOS)-$(Configuration)-$(ArchGroup)` - Netstandard Library - Copy to `bin\ref\netstandard2.0` - NetFx targeting pack - Copy to `bin\ref\net472` - Build targeting pack @@ -29,7 +29,7 @@ Below is a list of all the various options we pivot the project builds on: The following are the properties associated with each build pivot - `$(BuildTargetFramework) -> netstandard2.1 | netcoreapp5.0 | net472` -- `$(OSGroup) -> Windows | Linux | OSX | FreeBSD | [defaults to running OS when empty]` +- `$(TargetOS) -> Windows | Linux | OSX | FreeBSD | [defaults to running OS when empty]` - `$(Configuration) -> Release | [defaults to Debug when empty]` - `$(ArchGroup) - x86 | x64 | arm | arm64 | [defaults to x64 when empty]` - `$(RuntimeOS) - win7 | osx10.10 | ubuntu.14.04 | [any other RID OS+version] | [defaults to running OS when empty]` See [RIDs](https://github.com/dotnet/runtime/tree/master/src/libraries/pkg/Microsoft.NETCore.Platforms) for more info. @@ -45,7 +45,7 @@ Each project will define a set of supported TargetFrameworks <PropertyGroup> ``` -- `$(BuildSettings) -> $(BuildTargetFramework)[-$(OSGroup)][-$(Configuration)][-$(ArchGroup)]` +- `$(BuildSettings) -> $(BuildTargetFramework)[-$(TargetOS)][-$(Configuration)][-$(ArchGroup)]` - Note this property should be file path safe and thus can be used in file names or directories that need to a unique path for a project configuration. - The only required Build Settings value is the `$(BuildTargetFramework)` the others are optional. @@ -79,10 +79,10 @@ When we have a project that has a `netstandard2.0` target framework that means t ## Options for building -A full or individual project build is centered around BuildTargetFramework, OSGroup, Configuration and ArchGroup. +A full or individual project build is centered around BuildTargetFramework, TargetOS, Configuration and ArchGroup. -1. `$(BuildTargetFramework), $(OSGroup), $(Configuration), $(ArchGroup)` can individually be passed in to change the default values. -2. If nothing is passed to the build then we will default value of these properties from the environment. Example: `netcoreapp5.0-[OSGroup Running On]-Debug-x64`. +1. `$(BuildTargetFramework), $(TargetOS), $(Configuration), $(ArchGroup)` can individually be passed in to change the default values. +2. If nothing is passed to the build then we will default value of these properties from the environment. Example: `netcoreapp5.0-[TargetOS Running On]-Debug-x64`. 3. While Building an individual project from the VS, we build the project for all latest netcoreapp target frameworks. We also have `RuntimeOS` which can be passed to customize the specific OS and version needed for native package builds as well as package restoration. If not passed it will default based on the OS you are running on. @@ -90,7 +90,7 @@ We also have `RuntimeOS` which can be passed to customize the specific OS and ve Any of the mentioned properties can be set via `/p:<Property>=<Value>` at the command line. When building using our run tool or any of the wrapper scripts around it (i.e. build.cmd) a number of these properties have aliases which make them easier to pass (run build.cmd/sh -? for the aliases). ## Selecting the correct BuildSettings -When building an individual project the `BuildTargetFramework` and `OSGroup` will be used to select the closest matching TargetFramework listed in the projects `TargetFrameworks` property. The rules used to select the targetFramework will consider compatible target frameworks and OS fallbacks. +When building an individual project the `BuildTargetFramework` and `TargetOS` will be used to select the closest matching TargetFramework listed in the projects `TargetFrameworks` property. The rules used to select the targetFramework will consider compatible target frameworks and OS fallbacks. ## Supported full build settings - .NET Core latest on current OS (default) -> `$(NetCoreAppCurrent)-[RunningOS]` @@ -130,7 +130,7 @@ The output for the src product build will be a flat runtime folder into the foll `bin\runtime\$(BuildSettings)` Note: The `BuildSettings` is a global property and not the project setting because we need all projects to output to the same runtime directory no matter which compatible target framework we select and build the project with. -```<BuildSettings>$(BuildTargetFramework)-$(OSGroup)-(Configuration)-(ArchGroup)</BuildSettings>``` +```<BuildSettings>$(BuildTargetFramework)-$(TargetOS)-(Configuration)-(ArchGroup)</BuildSettings>``` ## pkg In the pkg directory for the library there should be only **one** `.pkgproj` for the primary package for the library. If the library has platform-specific implementations those should be split into platform specific projects in a subfolder for each platform. (see [Package projects](./package-projects.md)) @@ -171,7 +171,7 @@ Each source file should use the following guidelines - The source code file should be named `<class>.cs` and should be placed in a directory structure that matches its namespace relative to its project directory. Ex. `System\IO\Stream.cs` - Larger nested classes should be factored out into their own source files using a partial class and the file name should be `<class>.<nested class>.cs`. - Classes that are forked based on BuildSettings should have file names `<class>.<BuildSettings>.cs`. - - Where `<BuildSettings>` is one of `$(OSGroup)`, `$(TargetFramework)`, `$(Configuration)`, or `$(Platform)`, matching exactly by case to ensure consistency. + - Where `<BuildSettings>` is one of `$(TargetOS)`, `$(TargetFramework)`, `$(Configuration)`, or `$(Platform)`, matching exactly by case to ensure consistency. - Classes that are forked based on a feature set should have file names `<class>.<feature>.cs`. - Where `<feature>` is the name of something that causes a fork in code that isn't a single configuration. Examples: - `.CoreCLR.cs` - implementation specific to CoreCLR runtime @@ -181,6 +181,6 @@ Each source file should use the following guidelines ## Define naming convention As mentioned in [Conventions for forked code](#conventions-for-forked-code) `#ifdef`ing the code is the last resort as it makes code harder to maintain overtime. If we do need to use `#ifdef`'s we should use the following conventions: -- Defines based on conventions should be one of `$(OSGroup)`, `$(TargetFramework)`, `$(Configuration)`, or `$(Platform)`, matching exactly by case to ensure consistency. +- Defines based on conventions should be one of `$(TargetOS)`, `$(TargetFramework)`, `$(Configuration)`, or `$(Platform)`, matching exactly by case to ensure consistency. - Examples: `<DefineConstants>$(DefineConstants);net46</DefineConstants>` - Defines based on convention should match the pattern `FEATURE_<feature name>`. These can unique to a given library project or potentially shared (via name) across multiple projects. diff --git a/docs/workflow/building/coreclr/cross-building.md b/docs/workflow/building/coreclr/cross-building.md index d25129ca689..6448635f495 100644 --- a/docs/workflow/building/coreclr/cross-building.md +++ b/docs/workflow/building/coreclr/cross-building.md @@ -99,7 +99,7 @@ Cross compiling CoreCLR ~/runtime/ $ ROOTFS_DIR=/home/arm ./build.sh arm debug verbose cross -As usual, the resulting binaries will be found in `artifacts/bin/coreclr/BuildOS.BuildArch.BuildType/` +As usual, the resulting binaries will be found in `artifacts/bin/coreclr/TargetOS.BuildArch.BuildType/` Cross compiling CoreCLR for Other VFP configurations ---------------------------------------------------------- @@ -137,7 +137,7 @@ To build System.Private.CoreLib for Linux, run the following command: lgs@ubuntu ~/git/coreclr/ $ build.sh arm debug verbose ``` -The output is at artifacts/Product/<BuildOS>.arm.Debug/System.Private.CoreLib.dll. +The output is at artifacts/Product/<TargetOS>.arm.Debug/System.Private.CoreLib.dll. ``` lgs@ubuntu ~/git/coreclr/ $ file ./artifacts/Product/Linux.arm.Debug/System.Private.CoreLib.dll diff --git a/docs/workflow/building/libraries/README.md b/docs/workflow/building/libraries/README.md index 0c3e67f35aa..367cf0075a0 100644 --- a/docs/workflow/building/libraries/README.md +++ b/docs/workflow/building/libraries/README.md @@ -72,10 +72,10 @@ The above commands will give you libraries in "debug" configuration (the default The libraries build has two logical components, the native build which produces the "shims" (which provide a stable interface between the OS and managed code) and the managed build which produces the MSIL code and NuGet packages that make up Libraries. The commands above will build both. -The build settings (BuildTargetFramework, OSGroup, Configuration, Architecture) are generally defaulted based on where you are building (i.e. which OS or which architecture) but we have a few shortcuts for the individual properties that can be passed to the build scripts: +The build settings (BuildTargetFramework, TargetOS, Configuration, Architecture) are generally defaulted based on where you are building (i.e. which OS or which architecture) but we have a few shortcuts for the individual properties that can be passed to the build scripts: - `-framework|-f` identifies the target framework for the build. Possible values include `netcoreapp5.0` (currently the latest .NET Core version) or `net472`. (msbuild property `BuildTargetFramework`) -- `-os` identifies the OS for the build. It defaults to the OS you are running on but possible values include `Windows_NT`, `Unix`, `Linux`, or `OSX`. (msbuild property `OSGroup`) +- `-os` identifies the OS for the build. It defaults to the OS you are running on but possible values include `Windows_NT`, `Unix`, `Linux`, or `OSX`. (msbuild property `TargetOS`) - `-configuration|-c Debug|Release` controls the optimization level the compilers use for the build. It defaults to `Debug`. (msbuild property `Configuration`) - `-arch` identifies the architecture for the build. It defaults to `x64` but possible values include `x64`, `x86`, `arm`, or `arm64`. (msbuild property `ArchGroup`) @@ -160,7 +160,7 @@ Under the `src` directory is a set of directories, each of which represents a pa For example the `src\libraries\System.Diagnostics.DiagnosticSource` directory holds the source code for the System.Diagnostics.DiagnosticSource.dll assembly. -You can build the DLL for System.Diagnostics.DiagnosticSource.dll by going to the `src\libraries\System.Diagnostics.DiagnosticsSource\src` directory and typing `dotnet build`. The DLL ends up in `artifacts\bin\AnyOS.AnyCPU.Debug\System.Diagnostics.DiagnosticSource` as well as `artifacts\bin\runtime\[$(BuildTargetFramework)-$(OSGroup)-$(Configuration)-$(ArchGroup)]`. +You can build the DLL for System.Diagnostics.DiagnosticSource.dll by going to the `src\libraries\System.Diagnostics.DiagnosticsSource\src` directory and typing `dotnet build`. The DLL ends up in `artifacts\bin\AnyOS.AnyCPU.Debug\System.Diagnostics.DiagnosticSource` as well as `artifacts\bin\runtime\[$(BuildTargetFramework)-$(TargetOS)-$(Configuration)-$(ArchGroup)]`. You can build the tests for System.Diagnostics.DiagnosticSource.dll by going to `src\libraries\System.Diagnostics.DiagnosticSource\tests` and typing `dotnet build`. @@ -173,7 +173,7 @@ For libraries that have multiple target frameworks the target frameworks will be - Build project for Linux for .NET Core ``` -dotnet build System.Net.NetworkInformation.csproj /p:OSGroup=Linux +dotnet build System.Net.NetworkInformation.csproj /p:TargetOS=Linux ``` - Build Release version of library diff --git a/docs/workflow/building/libraries/cross-building.md b/docs/workflow/building/libraries/cross-building.md index ca6ac856017..36aec2d9037 100644 --- a/docs/workflow/building/libraries/cross-building.md +++ b/docs/workflow/building/libraries/cross-building.md @@ -56,7 +56,7 @@ And with: $ ROOTFS_DIR=/mnt/corefx-cross/arm ./src/Native/build-native.sh debug arm verbose cross -As usual the generated binaries will be found in `artifacts/bin/BuildOS.BuildArch.BuildType/native` as following: +As usual the generated binaries will be found in `artifacts/bin/TargetOS.BuildArch.BuildType/native` as following: $ ls -al ./artifacts/bin/Linux.arm.Debug/native total 988 @@ -85,7 +85,7 @@ You can also build just managed code with: $ ./build.sh --arch arm /p:BuildNative=false -The output is at `artifacts/bin/[BuildSettings]` where `BuildSettings` looks something like `netcoreapp5.0-<OSGroup>-Debug-<Architecture>`. Ex: `artifacts/bin/netcoreapp5.0-Linux-Debug-x64`. For more details on the build configurations see [project-guidelines](/docs/coding-guidelines/project-guidelines.md) +The output is at `artifacts/bin/[BuildSettings]` where `BuildSettings` looks something like `netcoreapp5.0-<TargetOS>-Debug-<Architecture>`. Ex: `artifacts/bin/netcoreapp5.0-Linux-Debug-x64`. For more details on the build configurations see [project-guidelines](/docs/coding-guidelines/project-guidelines.md) Building corefx for Linux ARM Emulator ======================================= diff --git a/docs/workflow/building/libraries/freebsd-instructions.md b/docs/workflow/building/libraries/freebsd-instructions.md index c55e37ef98a..1ee100dfd62 100644 --- a/docs/workflow/building/libraries/freebsd-instructions.md +++ b/docs/workflow/building/libraries/freebsd-instructions.md @@ -79,7 +79,7 @@ index 81b8c7b..bb26868 100644 @@ -5,6 +5,7 @@ <BuildArguments>$(Platform) $(Configuration) skiptests</BuildArguments> <BuildArguments Condition="'$(SkipDisablePgo)' != 'true'">$(BuildArguments) -nopgooptimize</BuildArguments> - <BuildArguments Condition="'$(OSGroup)' != 'Windows_NT'">$(BuildArguments) msbuildonunsupportedplatform</BuildArguments> + <BuildArguments Condition="'$(TargetOS)' != 'Windows_NT'">$(BuildArguments) msbuildonunsupportedplatform</BuildArguments> + <BuildArguments Condition="'$(TargetOS)' == 'FreeBSD'">$(BuildArguments) -clang6.0</BuildArguments> <BuildArguments Condition="'$(UseSystemLibraries)' == 'true'">$(BuildArguments) cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE</BuildArguments> <BuildArguments Condition="$(Platform.Contains('arm'))">$(BuildArguments) skipnuget cross -skiprestore cmakeargs -DFEATURE_GDBJIT=TRUE</BuildArguments> @@ -235,7 +235,7 @@ This has two parts. We need to build managed bits on supported OS. For example o git clone https://github.com/dotnet/corefx cd corefx git checkout d47cae744ddfb625db8e391cecb261e4c3d7bb1c -./build.sh -c Release /p:osgroup=FreeBSD +./build.sh -c Release -os FreeBSD ``` on FreeBSD we need to build native bits: @@ -275,4 +275,3 @@ if missing add following section to `Microsoft.NETCore.App.deps.json` "fileVersion": "4.0.0.0" }, ``` - diff --git a/docs/workflow/testing/coreclr/testing.md b/docs/workflow/testing/coreclr/testing.md index b212c95e59a..125949985ed 100644 --- a/docs/workflow/testing/coreclr/testing.md +++ b/docs/workflow/testing/coreclr/testing.md @@ -33,7 +33,7 @@ Note: CoreCLR must be built prior to building an individual test. See the first * It is possible to explicitly run only the native test build with `build-test.sh/cmd skipmanaged` * Managed Test: Invoke `dotnet build` on the project directly. `dotnet` can be the `dotnet.sh` or `dotnet.cmd` script in the repo root. ``` -<runtime-repo-root>/dotnet.sh msbuild <runtime-repo-root>/src/coreclr/tests/src/JIT/CodegenBringupTests/Array1_d.csproj /p:__BuildType=Release +<runtime-repo-root>/dotnet.sh build <runtime-repo-root>/src/coreclr/tests/src/JIT/CodegenBringupTests/Array1_d.csproj /p:__BuildType=Release ``` ## Additional Documents diff --git a/docs/workflow/testing/coreclr/unix-test-instructions.md b/docs/workflow/testing/coreclr/unix-test-instructions.md index 894fe533d3e..7d298ce5bde 100644 --- a/docs/workflow/testing/coreclr/unix-test-instructions.md +++ b/docs/workflow/testing/coreclr/unix-test-instructions.md @@ -28,12 +28,12 @@ Please note that this builds the Priority 0 tests. To build priority 1: During development there are many instances where building an individual test is fast and necessary. All of the necessary tools to build are under `coreclr`. It is possible to use `~/runtime/dotnet.sh msbuild` as you would normally use MSBuild with a few caveats. -**!! Note !! -- Passing /p:__BuildOS=[OSX|Linux] is required.** +**!! Note !! -- Passing /p:__TargetOS=[OSX|Linux] is required.** ## Building an Individual Test ``` -/path/to/runtime/dotnet.sh msbuild src/coreclr/tests/src/path-to-proj-file /p:__BuildOS=<BuildOS> /p:__BuildType=<BuildType> +/path/to/runtime/dotnet.sh msbuild src/coreclr/tests/src/path-to-proj-file /p:__TargetOS=<TargetOS> /p:__BuildType=<BuildType> ``` ## Running Tests diff --git a/docs/workflow/testing/libraries/filtering-tests.md b/docs/workflow/testing/libraries/filtering-tests.md index 4e250a00bf5..2b1b3d9867b 100644 --- a/docs/workflow/testing/libraries/filtering-tests.md +++ b/docs/workflow/testing/libraries/filtering-tests.md @@ -26,13 +26,13 @@ Use this attribute on test methods to specify that this test may only be run on **[Available Test Platforms](https://github.com/dotnet/arcade/blob/master/src/Microsoft.DotNet.XUnitExtensions/src/TestPlatforms.cs)** -When running tests by building a test project, tests that don't apply to the `OSGroup` are not run. For example, to run Linux-specific tests on a Linux box, use the following command line: +When running tests by building a test project, tests that don't apply to the `TargetOS` are not run. For example, to run Linux-specific tests on a Linux box, use the following command line: ```sh -dotnet build <csproj_file> /t:Test /p:OSGroup=Linux +dotnet build <csproj_file> /t:Test /p:TargetOS=Linux ``` To run all Linux-compatible tests that are failing: ```sh -dotnet build <csproj_file> /t:Test /p:OSGroup=Linux /p:WithCategories=failing +dotnet build <csproj_file> /t:Test /p:TargetOS=Linux /p:WithCategories=failing ``` #### ActiveIssueAttribute @@ -148,9 +148,9 @@ _**A few common examples with the above attributes:**_ - Run all tests acceptable on Windows that are not failing: ```cmd -dotnet build <csproj_file> /t:Test /p:OSGroup=Windows_NT +dotnet build <csproj_file> /t:Test /p:TargetOS=Windows_NT ``` - Run all outer loop tests acceptable on OS X that are currently associated with active issues: ```sh -dotnet build <csproj_file> /t:Test /p:OSGroup=OSX /p:WithCategories="OuterLoop;failing"" +dotnet build <csproj_file> /t:Test /p:TargetOS=OSX /p:WithCategories="OuterLoop;failing"" ``` diff --git a/eng/Configurations.props b/eng/Configurations.props index 4f3e58d31b2..12fe0471490 100644 --- a/eng/Configurations.props +++ b/eng/Configurations.props @@ -8,5 +8,18 @@ <MonoConfiguration Condition="'$(MonoConfiguration)' == '' and '$(RuntimeConfiguration.ToLower())' != 'checked'">$(RuntimeConfiguration)</MonoConfiguration> <!-- There's no checked configuration on Mono. --> <MonoConfiguration Condition="'$(MonoConfiguration)' == '' and '$(RuntimeConfiguration.ToLower())' == 'checked'">Debug</MonoConfiguration> + <LibrariesConfiguration Condition="'$(LibrariesConfiguration)' == ''">$(Configuration)</LibrariesConfiguration> + </PropertyGroup> + + <PropertyGroup> + <__TargetOS Condition="$([MSBuild]::IsOSPlatform('OSX'))">OSX</__TargetOS> + <__TargetOS Condition="'$(__TargetOS)' == '' and $([MSBuild]::IsOSPlatform('FREEBSD'))">FreeBSD</__TargetOS> + <__TargetOS Condition="'$(__TargetOS)' == '' and $([MSBuild]::IsOSPlatform('NETBSD'))">NetBSD</__TargetOS> + <__TargetOS Condition="'$(__TargetOS)' == '' and $([MSBuild]::IsOSUnixLike())">Linux</__TargetOS> + <__TargetOS Condition="'$(__TargetOS)' == '' and $([MSBuild]::IsOSPlatform('WINDOWS'))">Windows_NT</__TargetOS> + <TargetOS Condition="'$(TargetOS)' == ''">$(__TargetOS)</TargetOS> + <CoreCLRTargetOS Condition="'$(CoreCLRTargetOS)' == ''">$(TargetOS)</CoreCLRTargetOS> + <MonoTargetOS Condition="'$(MonoTargetOS)' == ''">$(TargetOS)</MonoTargetOS> + <LibrariesTargetOS Condition="'$(LibrariesTargetOS)' == ''">$(TargetOS)</LibrariesTargetOS> </PropertyGroup> </Project>
\ No newline at end of file diff --git a/eng/Signing.props b/eng/Signing.props index 84ac7260601..b4cc294c261 100644 --- a/eng/Signing.props +++ b/eng/Signing.props @@ -9,7 +9,8 @@ </PropertyGroup> <!-- Get artifact locations to sign. --> - <Import Project="$(RepositoryEngineeringDir)/liveBuilds.targets" /> + <Import Project="$(RepositoryEngineeringDir)Configurations.props" /> + <Import Project="$(RepositoryEngineeringDir)liveBuilds.targets" /> <ItemGroup> <!-- diff --git a/eng/build.ps1 b/eng/build.ps1 index 95253da1f37..54c64936bb0 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -144,7 +144,7 @@ foreach ($argument in $PSBoundParameters.Keys) "configuration" { $arguments += " -configuration $((Get-Culture).TextInfo.ToTitleCase($($PSBoundParameters[$argument])))" } "runtimeConfiguration" { $arguments += " /p:RuntimeConfiguration=$((Get-Culture).TextInfo.ToTitleCase($($PSBoundParameters[$argument])))" } "framework" { $arguments += " /p:BuildTargetFramework=$($PSBoundParameters[$argument].ToLowerInvariant())" } - "os" { $arguments += " /p:OSGroup=$($PSBoundParameters[$argument])" } + "os" { $arguments += " /p:TargetOS=$($PSBoundParameters[$argument])" } "allconfigurations" { $arguments += " /p:BuildAllConfigurations=true" } "arch" { $arch = $PSBoundParameters[$argument]; $arguments += " /p:ArchGroup=$arch /p:TargetArchitecture=$arch" } "properties" { $arguments += " " + $properties } diff --git a/eng/build.sh b/eng/build.sh index e16cff0a1c4..1a3c98853f2 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -65,7 +65,7 @@ initDistroRid() source $scriptroot/native/init-distro-rid.sh local passedRootfsDir="" - local buildOs="$1" + local targetOs="$1" local buildArch="$2" local isCrossBuild="$3" # For RID calculation purposes, say we are always a portable build @@ -76,7 +76,7 @@ initDistroRid() if (( isCrossBuild == 1 )); then passedRootfsDir=${ROOTFS_DIR} fi - initDistroRidGlobal ${buildOs} ${buildArch} ${isPortableBuild} ${passedRootfsDir} + initDistroRidGlobal ${targetOs} ${buildArch} ${isPortableBuild} ${passedRootfsDir} } arguments='' @@ -127,7 +127,7 @@ while [[ $# > 0 ]]; do ;; -os) os=$2 - arguments="$arguments /p:OSGroup=$2" + arguments="$arguments /p:TargetOS=$2" shift 2 ;; -allconfigurations) diff --git a/eng/codeOptimization.targets b/eng/codeOptimization.targets index e40af28a1b2..9f135452346 100644 --- a/eng/codeOptimization.targets +++ b/eng/codeOptimization.targets @@ -10,8 +10,8 @@ Condition="'$(IsEligibleForNgenOptimization)' == 'true'" BeforeTargets="CoreCompile"> <PropertyGroup> - <IbcOptimizationDataDir Condition="'$(OSGroup)' == 'Unix' or '$(OSGroup)' == 'Linux'">$(IbcOptimizationDataDir)Linux\</IbcOptimizationDataDir> - <IbcOptimizationDataDir Condition="'$(OSGroup)' != 'Unix' and '$(OSGroup)' != 'Linux'">$(IbcOptimizationDataDir)Windows\</IbcOptimizationDataDir> + <IbcOptimizationDataDir Condition="'$(TargetOS)' == 'Unix' or '$(TargetOS)' == 'Linux'">$(IbcOptimizationDataDir)Linux\</IbcOptimizationDataDir> + <IbcOptimizationDataDir Condition="'$(TargetOS)' == 'Windows_NT'">$(IbcOptimizationDataDir)Windows\</IbcOptimizationDataDir> </PropertyGroup> <ItemGroup> <_optimizationDataAssembly Include="$(IbcOptimizationDataDir)**\$(TargetFileName)" /> diff --git a/eng/liveBuilds.targets b/eng/liveBuilds.targets index 7e3349cdf22..7161aaba95a 100644 --- a/eng/liveBuilds.targets +++ b/eng/liveBuilds.targets @@ -1,14 +1,4 @@ <Project> - - <PropertyGroup> - <CoreCLROSGroup Condition="'$(CoreCLROSGroup)' == ''">$(OSGroup)</CoreCLROSGroup> - <MonoOSGroup Condition="'$(MonoOSGroup)' == ''">$(OSGroup)</MonoOSGroup> - <LibrariesOSGroup Condition="'$(LibrariesOSGroup)' == ''">$(OSGroup)</LibrariesOSGroup> - <LibrariesConfiguration Condition="'$(LibrariesConfiguration)' == ''">$(Configuration)</LibrariesConfiguration> - - <LibrariesOSGroupConfigurationArchitecture Condition="'$(LibrariesOSGroupConfigurationArchitecture)' == ''">$(LibrariesOSGroup)-$(LibrariesConfiguration)-$(TargetArchitecture)</LibrariesOSGroupConfigurationArchitecture> - </PropertyGroup> - <!-- Accept override paths for live artifacts. --> <PropertyGroup> <CoreCLRArtifactsPath Condition="'$(CoreCLROverridePath)' != ''">$([MSBuild]::NormalizeDirectory('$(CoreCLROverridePath)'))</CoreCLRArtifactsPath> @@ -19,6 +9,7 @@ <!-- Honor the RuntimeArtifactsPath property. --> <CoreCLRArtifactsPath Condition="'$(CoreCLRArtifactsPath)' == '' and '$(RuntimeArtifactsPath)' != ''">$([MSBuild]::NormalizeDirectory('$(RuntimeArtifactsPath)'))</CoreCLRArtifactsPath> <MonoArtifactsPath Condition="'$(MonoArtifactsPath)' == '' and '$(RuntimeArtifactsPath)' != ''">$([MSBuild]::NormalizeDirectory('$(RuntimeArtifactsPath)'))</MonoArtifactsPath> + <LibrariesTargetOSConfigurationArchitecture Condition="'$(LibrariesTargetOSConfigurationArchitecture)' == ''">$(LibrariesTargetOS)-$(LibrariesConfiguration)-$(TargetArchitecture)</LibrariesTargetOSConfigurationArchitecture> </PropertyGroup> <!-- @@ -52,13 +43,13 @@ Use '*', calculating these in a static context based on RID is hard. Note that putting '*' through a dir/path normalization function makes it not work, so avoid that. --> - <LibrariesOSGroupConfigurationArchitecture>*</LibrariesOSGroupConfigurationArchitecture> + <LibrariesTargetOSConfigurationArchitecture>*</LibrariesTargetOSConfigurationArchitecture> </PropertyGroup> <!-- Set up default live asset paths if no overrides provided. --> <PropertyGroup> - <CoreCLRArtifactsPath Condition="'$(CoreCLRArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts', 'bin', 'coreclr', '$(CoreCLROSGroup).$(TargetArchitecture).$(CoreCLRConfiguration)'))</CoreCLRArtifactsPath> - <MonoArtifactsPath Condition="'$(MonoArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts', 'bin', 'mono', '$(MonoOSGroup).$(TargetArchitecture).$(MonoConfiguration)'))</MonoArtifactsPath> + <CoreCLRArtifactsPath Condition="'$(CoreCLRArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts', 'bin', 'coreclr', '$(CoreCLRTargetOS).$(TargetArchitecture).$(CoreCLRConfiguration)'))</CoreCLRArtifactsPath> + <MonoArtifactsPath Condition="'$(MonoArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts', 'bin', 'mono', '$(MonoTargetOS).$(TargetArchitecture).$(MonoConfiguration)'))</MonoArtifactsPath> <LibrariesArtifactsPath Condition="'$(LibrariesArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts'))</LibrariesArtifactsPath> <LibrariesAllConfigurationsArtifactsPath Condition="'$(LibrariesAllConfigurationsArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts'))</LibrariesAllConfigurationsArtifactsPath> </PropertyGroup> @@ -78,9 +69,9 @@ <LibrariesSharedFrameworkRefArtifactsPath Condition="'$(LibrariesSharedFrameworkRefArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(LibrariesArtifactsPath)', 'bin', 'ref', 'microsoft.netcore.app', '$(LibrariesConfiguration)'))</LibrariesSharedFrameworkRefArtifactsPath> <LibrariesAllRefArtifactsPath Condition="'$(LibrariesAllRefArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(LibrariesArtifactsPath)', 'bin', 'ref', '$(NetCoreAppCurrent)'))</LibrariesAllRefArtifactsPath> - <LibrariesSharedFrameworkBinArtifactsPath Condition="'$(LibrariesSharedFrameworkBinArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(LibrariesArtifactsPath)', 'bin', 'pkg', '$(NetCoreAppCurrent)', 'runtime'))$(LibrariesOSGroupConfigurationArchitecture)\</LibrariesSharedFrameworkBinArtifactsPath> - <LibrariesAllBinArtifactsPath Condition="'$(LibrariesAllBinArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(LibrariesArtifactsPath)', 'bin', 'runtime'))$(NetCoreAppCurrent)-$(LibrariesOSGroupConfigurationArchitecture)\</LibrariesAllBinArtifactsPath> - <LibrariesNativeArtifactsPath Condition="'$(LibrariesNativeArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(LibrariesArtifactsPath)', 'bin', 'native'))$(NetCoreAppCurrent)-$(LibrariesOSGroupConfigurationArchitecture)\</LibrariesNativeArtifactsPath> + <LibrariesSharedFrameworkBinArtifactsPath Condition="'$(LibrariesSharedFrameworkBinArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(LibrariesArtifactsPath)', 'bin', 'pkg', '$(NetCoreAppCurrent)', 'runtime'))$(LibrariesTargetOSConfigurationArchitecture)\</LibrariesSharedFrameworkBinArtifactsPath> + <LibrariesAllBinArtifactsPath Condition="'$(LibrariesAllBinArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(LibrariesArtifactsPath)', 'bin', 'runtime'))$(NetCoreAppCurrent)-$(LibrariesTargetOSConfigurationArchitecture)\</LibrariesAllBinArtifactsPath> + <LibrariesNativeArtifactsPath Condition="'$(LibrariesNativeArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(LibrariesArtifactsPath)', 'bin', 'native'))$(NetCoreAppCurrent)-$(LibrariesTargetOSConfigurationArchitecture)\</LibrariesNativeArtifactsPath> <CoreCLRCrossTargetComponentDirName Condition="'$(TargetArchitecture)' == 'arm64' and '$(BuildArchitecture)' != 'arm64'">x64</CoreCLRCrossTargetComponentDirName> <CoreCLRCrossTargetComponentDirName Condition="'$(TargetArchitecture)' == 'arm' and '$(BuildArchitecture)' != 'arm' and '$(TargetsWindows)' == 'true'">x86</CoreCLRCrossTargetComponentDirName> @@ -155,7 +146,7 @@ these errors: it isn't a local dev scenario. --> <Target Name="EnsureLocalOSGroupConfigurationArchitectureSpecificArtifactsExist" - Condition="'$(LibrariesOSGroupConfigurationArchitecture)' != '*'"> + Condition="'$(LibrariesTargetOSConfigurationArchitecture)' != '*'"> <Error Condition="!Exists('$(LibrariesSharedFrameworkBinArtifactsPath)')" Text="The libraries subset category must be built before building this project. Missing artifacts: $(LibrariesSharedFrameworkBinArtifactsPath)" /> <Error Condition="!Exists('$(LibrariesAllBinArtifactsPath)')" Text="The libraries subset category must be built before building this project. Missing artifacts: $(LibrariesAllBinArtifactsPath)" /> <Error Condition="!Exists('$(LibrariesNativeArtifactsPath)')" Text="The libraries subset category must be built before building this project. Missing artifacts: $(LibrariesNativeArtifactsPath)" /> diff --git a/eng/native/build-commons.sh b/eng/native/build-commons.sh index 24562375bd7..cf31643c47e 100755 --- a/eng/native/build-commons.sh +++ b/eng/native/build-commons.sh @@ -11,7 +11,7 @@ initTargetDistroRid() passedRootfsDir="$ROOTFS_DIR" fi - initDistroRidGlobal "$__BuildOS" "$__BuildArch" "$__PortableBuild" "$passedRootfsDir" + initDistroRidGlobal "$__TargetOS" "$__BuildArch" "$__PortableBuild" "$passedRootfsDir" } isMSBuildOnNETCoreSupported() @@ -73,7 +73,7 @@ build_native() message="$5" # All set to commence the build - echo "Commencing build of \"$message\" for $__BuildOS.$__BuildArch.$__BuildType in $intermediatesDir" + echo "Commencing build of \"$message\" for $__TargetOS.$__BuildArch.$__BuildType in $intermediatesDir" if [[ "$__UseNinja" == 1 ]]; then generator="ninja" @@ -197,7 +197,7 @@ source "$__RepoRootDir/eng/native/init-os-and-arch.sh" __BuildArch=$arch __HostArch=$arch -__BuildOS=$os +__TargetOS=$os __HostOS=$os __msbuildonunsupportedplatform=0 @@ -376,7 +376,7 @@ else __NumProc=$(nproc --all) fi -__CommonMSBuildArgs="/p:__BuildArch=$__BuildArch /p:__BuildType=$__BuildType /p:__BuildOS=$__BuildOS /nodeReuse:false $__OfficialBuildIdArg $__SignTypeArg $__SkipRestoreArg" +__CommonMSBuildArgs="/p:__BuildArch=$__BuildArch /p:__BuildType=$__BuildType /p:__TargetOS=$__TargetOS /nodeReuse:false $__OfficialBuildIdArg $__SignTypeArg $__SkipRestoreArg" # Configure environment if we are doing a verbose build if [[ "$__VerboseBuild" == 1 ]]; then diff --git a/eng/native/init-distro-rid.sh b/eng/native/init-distro-rid.sh index df813691776..c517478b16d 100644 --- a/eng/native/init-distro-rid.sh +++ b/eng/native/init-distro-rid.sh @@ -3,7 +3,7 @@ # initNonPortableDistroRid # # Input: -# buildOs: (str) +# targetOs: (str) # buildArch: (str) # isPortable: (int) # rootfsDir: (str) @@ -36,13 +36,13 @@ initNonPortableDistroRid() # Make sure out parameter is cleared. __DistroRid= - local buildOs="$1" + local targetOs="$1" local buildArch="$2" local isPortable="$3" local rootfsDir="$4" local nonPortableBuildID="" - if [ "$buildOs" = "Linux" ]; then + if [ "$targetOs" = "Linux" ]; then if [ -e "${rootfsDir}/etc/os-release" ]; then source "${rootfsDir}/etc/os-release" @@ -69,7 +69,7 @@ initNonPortableDistroRid() fi fi - if [ "$buildOs" = "FreeBSD" ]; then + if [ "$targetOs" = "FreeBSD" ]; then __freebsd_major_version=$(freebsd-version | { read v; echo "${v%%.*}"; }) nonPortableBuildID="freebsd.$__freebsd_major_version-${buildArch}" fi @@ -113,7 +113,7 @@ initDistroRidGlobal() # deprecated. Now only __DistroRid is supported. It will be used for both # portable and non-portable rids and will be used in build-packages.sh - local buildOs="$1" + local targetOs="$1" local buildArch="$2" local isPortable="$3" local rootfsDir="" @@ -136,7 +136,7 @@ initDistroRidGlobal() isPortable=0 fi - initNonPortableDistroRid "${buildOs}" "${buildArch}" "${isPortable}" "${rootfsDir}" + initNonPortableDistroRid "${targetOs}" "${buildArch}" "${isPortable}" "${rootfsDir}" if [ "$buildArch" = "wasm" ]; then __DistroRid=WebAssembly-wasm @@ -157,11 +157,11 @@ initDistroRidGlobal() fi if [ -z "${distroRid}" ]; then - if [ "$buildOs" = "Linux" ]; then + if [ "$targetOs" = "Linux" ]; then distroRid="linux-$buildArch" - elif [ "$buildOs" = "OSX" ]; then + elif [ "$targetOs" = "OSX" ]; then distroRid="osx-$buildArch" - elif [ "$buildOs" = "FreeBSD" ]; then + elif [ "$targetOs" = "FreeBSD" ]; then distroRid="freebsd-$buildArch" fi fi diff --git a/eng/notSupported.SourceBuild.targets b/eng/notSupported.SourceBuild.targets index f0d5bf4db09..afbbdd32de4 100644 --- a/eng/notSupported.SourceBuild.targets +++ b/eng/notSupported.SourceBuild.targets @@ -8,7 +8,7 @@ Text="'DotNetSourceBuildIntermediatePath' must be specified when 'DotNetBuildFromSource' is true" /> <PropertyGroup> - <_notSupportedSourceDirectory>$([MSBuild]::NormalizeDirectory('$(DotNetSourceBuildIntermediatePath)', '$(MSBuildProjectName)', '$(TargetFramework)-$(OSGroup)'))</_notSupportedSourceDirectory> + <_notSupportedSourceDirectory>$([MSBuild]::NormalizeDirectory('$(DotNetSourceBuildIntermediatePath)', '$(MSBuildProjectName)', '$(TargetFramework)-$(TargetOS)'))</_notSupportedSourceDirectory> <NotSupportedSourceFile>$(_notSupportedSourceDirectory)$(TargetName).notsupported.cs</NotSupportedSourceFile> </PropertyGroup> diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index 6cda0e1ab31..fa2eeb8eba2 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -140,7 +140,7 @@ jobs: # Sign on Windows - ${{ if and(eq(parameters.osGroup, 'Windows_NT'), eq(parameters.signBinaries, 'true')) }}: - - powershell: eng\common\build.ps1 -ci -sign -restore -configuration:$(buildConfig) -warnaserror:0 /p:ArcadeBuild=true /p:OfficialBuild=true /p:BuildOS=$(osGroup) /p:BuildArch=$(archType) /p:BuildType=$(_BuildConfig) /p:DotNetSignType=$env:_SignType -projects $(Build.SourcesDirectory)\eng\empty.csproj + - powershell: eng\common\build.ps1 -ci -sign -restore -configuration:$(buildConfig) -warnaserror:0 /p:ArcadeBuild=true /p:OfficialBuild=true /p:TargetOS=$(osGroup) /p:BuildArch=$(archType) /p:BuildType=$(_BuildConfig) /p:DotNetSignType=$env:_SignType -projects $(Build.SourcesDirectory)\eng\empty.csproj displayName: Sign Binaries - task: PublishPipelineArtifact@1 diff --git a/eng/pipelines/coreclr/templates/send-to-helix-step.yml b/eng/pipelines/coreclr/templates/send-to-helix-step.yml index cd6a354fcab..7209065b570 100644 --- a/eng/pipelines/coreclr/templates/send-to-helix-step.yml +++ b/eng/pipelines/coreclr/templates/send-to-helix-step.yml @@ -36,7 +36,7 @@ steps: condition: ${{ parameters.condition }} env: __BuildArch: ${{ parameters.archType }} - __BuildOS: ${{ parameters.osGroup }} + __TargetOS: ${{ parameters.osGroup }} __BuildType: ${{ parameters.buildConfig }} _Creator: ${{ parameters.creator }} _PublishTestResults: ${{ parameters.publishTestResults }} @@ -75,7 +75,7 @@ steps: condition: ${{ parameters.condition }} env: __BuildArch: ${{ parameters.archType }} - __BuildOS: ${{ parameters.osGroup }} + __TargetOS: ${{ parameters.osGroup }} __BuildType: ${{ parameters.buildConfig }} _Creator: ${{ parameters.creator }} _PublishTestResults: ${{ parameters.publishTestResults }} diff --git a/eng/pipelines/libraries/helix.yml b/eng/pipelines/libraries/helix.yml index e1172577b5b..6866848dc69 100644 --- a/eng/pipelines/libraries/helix.yml +++ b/eng/pipelines/libraries/helix.yml @@ -19,7 +19,7 @@ steps: /p:RuntimeFlavor=${{ parameters.runtimeFlavor }} /p:ArchGroup=${{ parameters.archGroup }} /p:Configuration=${{ parameters.configuration }} - /p:OSGroup=${{ parameters.targetOS }} + /p:TargetOS=${{ parameters.targetOS }} /p:TestScope=${{ parameters.testScope }} /p:TestRunNamePrefixSuffix=${{ parameters.testRunNamePrefixSuffix }} /p:HelixBuild=$(Build.BuildNumber) diff --git a/eng/pipelines/mono/templates/build-job.yml b/eng/pipelines/mono/templates/build-job.yml index 34ce6bc1f36..d23bfded5a4 100644 --- a/eng/pipelines/mono/templates/build-job.yml +++ b/eng/pipelines/mono/templates/build-job.yml @@ -119,7 +119,7 @@ jobs: # Publish official build - ${{ if and(ne(parameters.llvm, true), eq(parameters.publishToBlobFeed, 'true')) }}: - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: - - script: $(Build.SourcesDirectory)/eng/common/build.sh --ci --restore --publish --configuration $(_BuildConfig) /p:DotNetPublishUsingPipelines=true /p:DotNetPublishToBlobFeed=true /p:DotNetPublishBlobFeedUrl=$(dotnetfeedUrl) /p:DotNetPublishBlobFeedKey=$(dotnetfeedPAT) /p:__BuildType=$(_BuildConfig) /p:__BuildArch=$(archType) /p:__BuildOS=$(osGroup) /p:OSIdentifier=$(osGroup)$(osSubgroup) /bl:"$(Build.SourcesDirectory)/artifacts/log/publish-pkgs.binlog" --projects $(Build.SourcesDirectory)/eng/empty.csproj + - script: $(Build.SourcesDirectory)/eng/common/build.sh --ci --restore --publish --configuration $(_BuildConfig) /p:DotNetPublishUsingPipelines=true /p:DotNetPublishToBlobFeed=true /p:DotNetPublishBlobFeedUrl=$(dotnetfeedUrl) /p:DotNetPublishBlobFeedKey=$(dotnetfeedPAT) /p:__BuildType=$(_BuildConfig) /p:__BuildArch=$(archType) /p:__TargetOS=$(osGroup) /p:OSIdentifier=$(osGroup)$(osSubgroup) /bl:"$(Build.SourcesDirectory)/artifacts/log/publish-pkgs.binlog" --projects $(Build.SourcesDirectory)/eng/empty.csproj displayName: Publish packages to blob feed env: # TODO: remove NUGET_PACKAGES once https://github.com/dotnet/arcade/issues/1578 is fixed @@ -129,7 +129,7 @@ jobs: DotNetCoreSdkDir: /usr/local/dotnet - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: # TODO: pass publish feed url and access token in from the internal pipeline - - powershell: eng\common\build.ps1 -ci -restore -publish -configuration $(_BuildConfig) /p:DotNetPublishUsingPipelines=true /p:DotNetPublishToBlobFeed=true /p:DotNetPublishBlobFeedUrl=$(dotnetfeedUrl) /p:DotNetPublishBlobFeedKey=$(dotnetfeedPAT) /p:__BuildType=$(_BuildConfig) /p:__BuildArch=$(archType) /p:__BuildOS=$(osGroup) /p:OSIdentifier=$(osGroup)$(osSubgroup) /bl:"$(Build.SourcesDirectory)\artifacts\log\publish-pkgs.binlog" -projects $(Build.SourcesDirectory)\eng\empty.csproj + - powershell: eng\common\build.ps1 -ci -restore -publish -configuration $(_BuildConfig) /p:DotNetPublishUsingPipelines=true /p:DotNetPublishToBlobFeed=true /p:DotNetPublishBlobFeedUrl=$(dotnetfeedUrl) /p:DotNetPublishBlobFeedKey=$(dotnetfeedPAT) /p:__BuildType=$(_BuildConfig) /p:__BuildArch=$(archType) /p:__TargetOS=$(osGroup) /p:OSIdentifier=$(osGroup)$(osSubgroup) /bl:"$(Build.SourcesDirectory)\artifacts\log\publish-pkgs.binlog" -projects $(Build.SourcesDirectory)\eng\empty.csproj displayName: Publish packages to blob feed env: # TODO: remove NUGET_PACKAGES once https://github.com/dotnet/arcade/issues/1578 is fixed diff --git a/src/coreclr/build-runtime.cmd b/src/coreclr/build-runtime.cmd index 120c6f14c4b..4237227514e 100644 --- a/src/coreclr/build-runtime.cmd +++ b/src/coreclr/build-runtime.cmd @@ -26,12 +26,12 @@ if defined VS160COMNTOOLS ( :: Note that the msbuild project files (specifically, dir.proj) will use the following variables, if set: :: __BuildArch -- default: x64 :: __BuildType -- default: Debug -:: __BuildOS -- default: Windows_NT +:: __TargetOS -- default: Windows_NT :: __ProjectDir -- default: directory of the dir.props file :: __RepoRootDir -- default: directory two levels above the dir.props file :: __SourceDir -- default: %__ProjectDir%\src\ :: __RootBinDir -- default: %__RepoRootDir%\artifacts\ -:: __BinDir -- default: %__RootBinDir%\%__BuildOS%.%__BuildArch.%__BuildType%\ +:: __BinDir -- default: %__RootBinDir%\%__TargetOS%.%__BuildArch.%__BuildType%\ :: __IntermediatesDir :: __PackagesBinDir -- default: %__BinDir%\.nuget :: @@ -40,7 +40,7 @@ if defined VS160COMNTOOLS ( :: Set the default arguments for build set __BuildArch=x64 set __BuildType=Debug -set __BuildOS=Windows_NT +set __TargetOS=Windows_NT :: Set the various build properties here so that CMake and MSBuild can pick them up set "__ProjectDir=%~dp0" @@ -149,8 +149,8 @@ if [!__PassThroughArgs!]==[] ( set __PassThroughArgs=%__PassThroughArgs% %1 ) -if /i "%1" == "-alpinedac" (set __BuildNative=0&set __BuildCrossArchNative=1&set __CrossArch=x64&set __BuildOS=alpine&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) -if /i "%1" == "-linuxdac" (set __BuildNative=0&set __BuildCrossArchNative=1&set __CrossArch=x64&set __BuildOS=Linux&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "-alpinedac" (set __BuildNative=0&set __BuildCrossArchNative=1&set __CrossArch=x64&set __TargetOS=alpine&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "-linuxdac" (set __BuildNative=0&set __BuildCrossArchNative=1&set __CrossArch=x64&set __TargetOS=Linux&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "-configureonly" (set __ConfigureOnly=1&set __BuildNative=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "-skipconfigure" (set __SkipConfigure=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) @@ -225,7 +225,7 @@ if %__BuildTypeDebug%==1 set __BuildType=Debug if %__BuildTypeChecked%==1 set __BuildType=Checked if %__BuildTypeRelease%==1 set __BuildType=Release -set __CommonMSBuildArgs=/p:__BuildOS=%__BuildOS% /p:__BuildType=%__BuildType% /p:__BuildArch=%__BuildArch% +set __CommonMSBuildArgs=/p:__TargetOS=%__TargetOS% /p:__BuildType=%__BuildType% /p:__BuildArch=%__BuildArch% if %__EnforcePgo%==1 ( if %__BuildArchArm%==1 ( @@ -257,10 +257,10 @@ if %__PgoOptimize%==0 ( set __RestoreOptData=0 ) -set "__BinDir=%__RootBinDir%\bin\coreclr\%__BuildOS%.%__BuildArch%.%__BuildType%" -set "__IntermediatesDir=%__RootBinDir%\obj\coreclr\%__BuildOS%.%__BuildArch%.%__BuildType%" +set "__BinDir=%__RootBinDir%\bin\coreclr\%__TargetOS%.%__BuildArch%.%__BuildType%" +set "__IntermediatesDir=%__RootBinDir%\obj\coreclr\%__TargetOS%.%__BuildArch%.%__BuildType%" set "__ArtifactsIntermediatesDir=%__RepoRootDir%\artifacts\obj\coreclr\" -if "%__NMakeMakefiles%"=="1" (set "__IntermediatesDir=%__RootBinDir%\nmakeobj\%__BuildOS%.%__BuildArch%.%__BuildType%") +if "%__NMakeMakefiles%"=="1" (set "__IntermediatesDir=%__RootBinDir%\nmakeobj\%__TargetOS%.%__BuildArch%.%__BuildType%") set "__PackagesBinDir=%__BinDir%\.nuget" set "__CrossComponentBinDir=%__BinDir%" set "__CrossCompIntermediatesDir=%__IntermediatesDir%\crossgen" @@ -318,7 +318,7 @@ REM ============================================================================ @if defined _echo @echo on echo %__MsgPrefix%Generating native version headers -set "__BinLog=%__LogsDir%\GenerateVersionHeaders_%__BuildOS%__%__BuildArch%__%__BuildType%.binlog" +set "__BinLog=%__LogsDir%\GenerateVersionHeaders_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog" powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" /clp:nosummary %__ArcadeScriptArgs%^ %__RepoRootDir%\eng\empty.csproj /p:NativeVersionFile="%__RootBinDir%\obj\coreclr\_version.h"^ /t:GenerateNativeVersionFile /restore^ @@ -338,7 +338,7 @@ REM ============================================================================ set OptDataProjectFilePath=%__ProjectDir%\src\.nuget\optdata\optdata.csproj if %__RestoreOptData% EQU 1 ( echo %__MsgPrefix%Restoring the OptimizationData Package - set "__BinLog=%__LogsDir%\OptRestore_%__BuildOS%__%__BuildArch%__%__BuildType%.binlog" + set "__BinLog=%__LogsDir%\OptRestore_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog" powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" /clp:nosummary %__ArcadeScriptArgs%^ %OptDataProjectFilePath% /t:Restore^ %__CommonMSBuildArgs% %__UnprocessedBuildArgs%^ @@ -352,7 +352,7 @@ if %__RestoreOptData% EQU 1 ( set __PgoOptDataPath= if %__PgoOptimize% EQU 1 ( set PgoDataPackagePathOutputFile="%__IntermediatesDir%\optdatapath.txt" - set "__BinLog=%__LogsDir%\PgoVersionRead_%__BuildOS%__%__BuildArch%__%__BuildType%.binlog" + set "__BinLog=%__LogsDir%\PgoVersionRead_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog" REM Parse the optdata package versions out of msbuild so that we can pass them on to CMake powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" /clp:nosummary %__ArcadeScriptArgs%^ @@ -402,7 +402,7 @@ if %__BuildCrossArchNative% EQU 1 ( REM Scope environment changes start { setlocal - echo %__MsgPrefix%Commencing build of cross architecture native components for %__BuildOS%.%__BuildArch%.%__BuildType% + echo %__MsgPrefix%Commencing build of cross architecture native components for %__TargetOS%.%__BuildArch%.%__BuildType% REM Set the environment for the cross-arch native build set __VCBuildArch=x86_amd64 @@ -417,7 +417,7 @@ if %__BuildCrossArchNative% EQU 1 ( set __CMakeBinDir=%__CrossComponentBinDir% set "__CMakeBinDir=!__CMakeBinDir:\=/!" - set __ExtraCmakeArgs="-DCLR_CROSS_COMPONENTS_BUILD=1" "-DCLR_CMAKE_TARGET_ARCH=%__BuildArch%" "-DCLR_CMAKE_TARGET_OS=%__BuildOS%" "-DCLR_CMAKE_PGO_INSTRUMENT=%__PgoInstrument%" "-DCLR_CMAKE_OPTDATA_PATH=%__PgoOptDataPath%" "-DCLR_CMAKE_PGO_OPTIMIZE=%__PgoOptimize%" "-DCMAKE_SYSTEM_VERSION=10.0" "-DCLR_ENG_NATIVE_DIR=%__RepoRootDir%/eng/native" "-DCLR_REPO_ROOT_DIR=%__RepoRootDir%" + set __ExtraCmakeArgs="-DCLR_CROSS_COMPONENTS_BUILD=1" "-DCLR_CMAKE_TARGET_ARCH=%__BuildArch%" "-DCLR_CMAKE_TARGET_OS=%__TargetOS%" "-DCLR_CMAKE_PGO_INSTRUMENT=%__PgoInstrument%" "-DCLR_CMAKE_OPTDATA_PATH=%__PgoOptDataPath%" "-DCLR_CMAKE_PGO_OPTIMIZE=%__PgoOptimize%" "-DCMAKE_SYSTEM_VERSION=10.0" "-DCLR_ENG_NATIVE_DIR=%__RepoRootDir%/eng/native" "-DCLR_REPO_ROOT_DIR=%__RepoRootDir%" call "%__SourceDir%\pal\tools\gen-buildsys.cmd" "%__ProjectDir%" "%__CrossCompIntermediatesDir%" %__VSVersion% %__CrossArch% !__ExtraCmakeArgs! if not !errorlevel! == 0 ( @@ -435,10 +435,10 @@ if %__BuildCrossArchNative% EQU 1 ( if defined __ConfigureOnly goto SkipCrossCompBuild set __BuildLogRootName=Cross - set "__BuildLog=%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.log" - set "__BuildWrn=%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.wrn" - set "__BuildErr=%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.err" - set "__BinLog=%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.binlog" + set "__BuildLog=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.log" + set "__BuildWrn=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.wrn" + set "__BuildErr=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.err" + set "__BinLog=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog" set "__MsbuildLog=/flp:Verbosity=normal;LogFile=!__BuildLog!" set "__MsbuildWrn=/flp1:WarningsOnly;LogFile=!__BuildWrn!" set "__MsbuildErr=/flp2:ErrorsOnly;LogFile=!__BuildErr!" @@ -472,7 +472,7 @@ if %__BuildNative% EQU 1 ( REM Scope environment changes start { setlocal - echo %__MsgPrefix%Commencing build of native components for %__BuildOS%.%__BuildArch%.%__BuildType% + echo %__MsgPrefix%Commencing build of native components for %__TargetOS%.%__BuildArch%.%__BuildType% REM Set the environment for the native build set __VCBuildArch=x86_amd64 @@ -518,10 +518,10 @@ if %__BuildNative% EQU 1 ( if defined __ConfigureOnly goto SkipNativeBuild set __BuildLogRootName=CoreCLR - set "__BuildLog=%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.log" - set "__BuildWrn=%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.wrn" - set "__BuildErr=%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.err" - set "__BinLog=%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.binlog" + set "__BuildLog=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.log" + set "__BuildWrn=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.wrn" + set "__BuildErr=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.err" + set "__BinLog=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog" set "__MsbuildLog=/flp:Verbosity=normal;LogFile=!__BuildLog!" set "__MsbuildWrn=/flp1:WarningsOnly;LogFile=!__BuildWrn!" set "__MsbuildErr=/flp2:ErrorsOnly;LogFile=!__BuildErr!" diff --git a/src/coreclr/build-runtime.sh b/src/coreclr/build-runtime.sh index 149b1944fa9..0ac62fff937 100755 --- a/src/coreclr/build-runtime.sh +++ b/src/coreclr/build-runtime.sh @@ -189,8 +189,8 @@ __LogsDir="$__RootBinDir/log" __MsbuildDebugLogsDir="$__LogsDir/MsbuildDebugLogs" # Set the remaining variables based upon the determined build configuration -__BinDir="$__RootBinDir/bin/coreclr/$__BuildOS.$__BuildArch.$__BuildType" -__IntermediatesDir="$__RootBinDir/obj/coreclr/$__BuildOS.$__BuildArch.$__BuildType" +__BinDir="$__RootBinDir/bin/coreclr/$__TargetOS.$__BuildArch.$__BuildType" +__IntermediatesDir="$__RootBinDir/obj/coreclr/$__TargetOS.$__BuildArch.$__BuildType" __ArtifactsIntermediatesDir="$__RepoRootDir/artifacts/obj/coreclr" export __IntermediatesDir __ArtifactsIntermediatesDir __CrossComponentBinDir="$__BinDir" diff --git a/src/coreclr/build-test.cmd b/src/coreclr/build-test.cmd index b290f2f4a95..e947e7a5038 100644 --- a/src/coreclr/build-test.cmd +++ b/src/coreclr/build-test.cmd @@ -26,7 +26,7 @@ if defined VS160COMNTOOLS ( :: Set the default arguments for build set __BuildArch=x64 set __BuildType=Debug -set __BuildOS=Windows_NT +set __TargetOS=Windows_NT set "__ProjectDir=%~dp0" :: remove trailing slash @@ -137,21 +137,21 @@ if "%__TargetsWindows%"=="1" ( @if defined _echo @echo on -set __CommonMSBuildArgs=/p:__BuildOS=%__BuildOS% /p:__BuildType=%__BuildType% /p:__BuildArch=%__BuildArch% -set __msbuildArgs=/p:__BuildOS=%__BuildOS% /p:__BuildType=%__BuildType% /p:__BuildArch=%__BuildArch% /nologo /verbosity:minimal /clp:Summary /maxcpucount +set __CommonMSBuildArgs=/p:__TargetOS=%__TargetOS% /p:__BuildType=%__BuildType% /p:__BuildArch=%__BuildArch% +set __msbuildArgs=/p:__TargetOS=%__TargetOS% /p:__BuildType=%__BuildType% /p:__BuildArch=%__BuildArch% /nologo /verbosity:minimal /clp:Summary /maxcpucount echo %__MsgPrefix%Commencing CoreCLR test build -set "__BinDir=%__RootBinDir%\bin\coreclr\%__BuildOS%.%__BuildArch%.%__BuildType%" +set "__BinDir=%__RootBinDir%\bin\coreclr\%__TargetOS%.%__BuildArch%.%__BuildType%" set "__TestRootDir=%__RootBinDir%\tests\coreclr" -set "__TestBinDir=%__TestRootDir%\%__BuildOS%.%__BuildArch%.%__BuildType%" +set "__TestBinDir=%__TestRootDir%\%__TargetOS%.%__BuildArch%.%__BuildType%" REM We have different managed and native intermediate dirs because the managed bits will include REM the configuration information deeper in the intermediates path. REM These variables are used by the msbuild project files. if not defined __TestIntermediateDir ( - set "__TestIntermediateDir=tests\coreclr\obj\%__BuildOS%.%__BuildArch%.%__BuildType%" + set "__TestIntermediateDir=tests\coreclr\obj\%__TargetOS%.%__BuildArch%.%__BuildType%" ) set "__NativeTestIntermediatesDir=%__RootBinDir%\%__TestIntermediateDir%\Native" set "__ManagedTestIntermediatesDir=%__RootBinDir%\%__TestIntermediateDir%\Managed" @@ -251,9 +251,9 @@ if not exist "%__NativeTestIntermediatesDir%\CMakeCache.txt" ( ) set __BuildLogRootName=Tests_Native -set __BuildLog="%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.log" -set __BuildWrn="%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.wrn" -set __BuildErr="%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.err" +set __BuildLog="%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.log" +set __BuildWrn="%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.wrn" +set __BuildErr="%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.err" set __MsbuildLog=/flp:Verbosity=normal;LogFile=!__BuildLog! set __MsbuildWrn=/flp1:WarningsOnly;LogFile=!__BuildWrn! set __MsbuildErr=/flp2:ErrorsOnly;LogFile=!__BuildErr! @@ -283,9 +283,9 @@ if not defined XunitTestBinBase set XunitTestBinBase=%__TestBinDir%\ set "CORE_ROOT=%XunitTestBinBase%\Tests\Core_Root" set __BuildLogRootName=Restore_Product -set __BuildLog=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.log -set __BuildWrn=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.wrn -set __BuildErr=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.err +set __BuildLog=%__LogsDir%\%__BuildLogRootName%_%__TargetOS%__%__BuildArch%__%__BuildType%.log +set __BuildWrn=%__LogsDir%\%__BuildLogRootName%_%__TargetOS%__%__BuildArch%__%__BuildType%.wrn +set __BuildErr=%__LogsDir%\%__BuildLogRootName%_%__TargetOS%__%__BuildArch%__%__BuildType%.err set __MsbuildLog=/flp:Verbosity=normal;LogFile="%__BuildLog%" set __MsbuildWrn=/flp1:WarningsOnly;LogFile="%__BuildWrn%" set __MsbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%" @@ -325,9 +325,9 @@ if not defined VSINSTALLDIR ( ) set __AppendToLog=false set __BuildLogRootName=Tests_Managed -set __BuildLog=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.log -set __BuildWrn=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.wrn -set __BuildErr=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.err +set __BuildLog=%__LogsDir%\%__BuildLogRootName%_%__TargetOS%__%__BuildArch%__%__BuildType%.log +set __BuildWrn=%__LogsDir%\%__BuildLogRootName%_%__TargetOS%__%__BuildArch%__%__BuildType%.wrn +set __BuildErr=%__LogsDir%\%__BuildLogRootName%_%__TargetOS%__%__BuildArch%__%__BuildType%.err REM Execute msbuild test build in stages - workaround for excessive data retention in MSBuild ConfigCache REM See https://github.com/Microsoft/msbuild/issues/2993 @@ -450,9 +450,9 @@ if defined __RuntimeId ( ) set __BuildLogRootName=Tests_Overlay_Managed -set __BuildLog=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.log -set __BuildWrn=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.wrn -set __BuildErr=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.err +set __BuildLog=%__LogsDir%\%__BuildLogRootName%_%__TargetOS%__%__BuildArch%__%__BuildType%.log +set __BuildWrn=%__LogsDir%\%__BuildLogRootName%_%__TargetOS%__%__BuildArch%__%__BuildType%.wrn +set __BuildErr=%__LogsDir%\%__BuildLogRootName%_%__TargetOS%__%__BuildArch%__%__BuildType%.err set __MsbuildLog=/flp:Verbosity=normal;LogFile="%__BuildLog%" set __MsbuildWrn=/flp1:WarningsOnly;LogFile="%__BuildWrn%" set __MsbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%" @@ -485,9 +485,9 @@ if defined __SkipManaged goto SkipBuildingWrappers echo %__MsgPrefix%Creating test wrappers set __BuildLogRootName=Tests_XunitWrapper -set __BuildLog=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.log -set __BuildWrn=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.wrn -set __BuildErr=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.err +set __BuildLog=%__LogsDir%\%__BuildLogRootName%_%__TargetOS%__%__BuildArch%__%__BuildType%.log +set __BuildWrn=%__LogsDir%\%__BuildLogRootName%_%__TargetOS%__%__BuildArch%__%__BuildType%.wrn +set __BuildErr=%__LogsDir%\%__BuildLogRootName%_%__TargetOS%__%__BuildArch%__%__BuildType%.err set __MsbuildLog=/flp:Verbosity=normal;LogFile="%__BuildLog%" set __MsbuildWrn=/flp1:WarningsOnly;LogFile="%__BuildWrn%" set __MsbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%" @@ -503,7 +503,7 @@ if errorlevel 1 ( exit /b 1 ) -echo { "build_os": "%__BuildOS%", "build_arch": "%__BuildArch%", "build_type": "%__BuildType%" } > "%__TestBinDir%/build_info.json" +echo { "build_os": "%__TargetOS%", "build_arch": "%__BuildArch%", "build_type": "%__BuildType%" } > "%__TestBinDir%/build_info.json" :SkipBuildingWrappers diff --git a/src/coreclr/build-test.sh b/src/coreclr/build-test.sh index 97b3654da3f..b482ca9fbf0 100755 --- a/src/coreclr/build-test.sh +++ b/src/coreclr/build-test.sh @@ -18,15 +18,15 @@ build_test_wrappers() # Set up directories and file names __BuildLogRootName="$subDirectoryName" - __BuildLog="$__LogsDir/${__BuildLogRootName}.${__BuildOS}.${__BuildArch}.${__BuildType}.log" - __BuildWrn="$__LogsDir/${__BuildLogRootName}.${__BuildOS}.${__BuildArch}.${__BuildType}.wrn" - __BuildErr="$__LogsDir/${__BuildLogRootName}.${__BuildOS}.${__BuildArch}.${__BuildType}.err" + __BuildLog="$__LogsDir/${__BuildLogRootName}.${__TargetOS}.${__BuildArch}.${__BuildType}.log" + __BuildWrn="$__LogsDir/${__BuildLogRootName}.${__TargetOS}.${__BuildArch}.${__BuildType}.wrn" + __BuildErr="$__LogsDir/${__BuildLogRootName}.${__TargetOS}.${__BuildArch}.${__BuildType}.err" __MsbuildLog="/fileloggerparameters:\"Verbosity=normal;LogFile=${__BuildLog}\"" __MsbuildWrn="/fileloggerparameters1:\"WarningsOnly;LogFile=${__BuildWrn}\"" __MsbuildErr="/fileloggerparameters2:\"ErrorsOnly;LogFile=${__BuildErr}\"" __Logging="$__MsbuildLog $__MsbuildWrn $__MsbuildErr /consoleloggerparameters:$buildVerbosity" - nextCommand="\"${__DotNetCli}\" msbuild \"${__ProjectDir}/tests/src/runtest.proj\" /nodereuse:false /p:BuildWrappers=true /p:TestBuildMode=$__TestBuildMode /p:TargetsWindows=false $__Logging /p:__BuildOS=$__BuildOS /p:__BuildType=$__BuildType /p:__BuildArch=$__BuildArch" + nextCommand="\"${__DotNetCli}\" msbuild \"${__ProjectDir}/tests/src/runtest.proj\" /nodereuse:false /p:BuildWrappers=true /p:TestBuildMode=$__TestBuildMode /p:TargetsWindows=false $__Logging /p:__TargetOS=$__TargetOS /p:__BuildType=$__BuildType /p:__BuildArch=$__BuildArch" eval $nextCommand local exitCode="$?" @@ -35,7 +35,7 @@ build_test_wrappers() exit "$exitCode" else echo "XUnit Wrappers have been built." - echo { "\"build_os\"": "\"${__BuildOS}\"", "\"build_arch\"": "\"${__BuildArch}\"", "\"build_type\"": "\"${__BuildType}\"" } > "${__TestWorkingDir}/build_info.json" + echo { "\"build_os\"": "\"${__TargetOS}\"", "\"build_arch\"": "\"${__BuildArch}\"", "\"build_type\"": "\"${__BuildType}\"" } > "${__TestWorkingDir}/build_info.json" fi fi @@ -59,10 +59,10 @@ generate_layout() __CMakeBinDir="${__TestBinDir}" if [[ -z "$__TestIntermediateDir" ]]; then - __TestIntermediateDir="tests/obj/${__BuildOS}.${__BuildArch}.${__BuildType}" + __TestIntermediateDir="tests/obj/${__TargetOS}.${__BuildArch}.${__BuildType}" fi - echo "__BuildOS: ${__BuildOS}" + echo "__TargetOS: ${__TargetOS}" echo "__BuildArch: ${__BuildArch}" echo "__BuildType: ${__BuildType}" echo "__TestIntermediateDir: ${__TestIntermediateDir}" @@ -84,7 +84,7 @@ generate_layout() MSBUILDDEBUGPATH="${__MsbuildDebugLogsDir}" export MSBUILDDEBUGPATH - __BuildProperties="-p:OSGroup=${__BuildOS} -p:BuildOS=${__BuildOS} -p:BuildArch=${__BuildArch} -p:BuildType=${__BuildType}" + __BuildProperties="-p:TargetOS=${__TargetOS} -p:BuildArch=${__BuildArch} -p:BuildType=${__BuildType}" # ========================================================================================= # === @@ -121,7 +121,7 @@ generate_layout() # Make sure to copy over the pulled down packages cp -r "$__BinDir"/* "$CORE_ROOT/" > /dev/null - if [[ "$__BuildOS" != "OSX" ]]; then + if [[ "$__TargetOS" != "OSX" ]]; then nextCommand="\"$__TestDir/setup-stress-dependencies.sh\" --arch=$__BuildArch --outputDir=$CORE_ROOT" echo "Resolve runtime dependences via $nextCommand" eval $nextCommand @@ -281,7 +281,7 @@ build_Tests() mkdir -p "${__ManagedTestIntermediatesDir}" fi - echo "__BuildOS: ${__BuildOS}" + echo "__TargetOS: ${__TargetOS}" echo "__BuildArch: ${__BuildArch}" echo "__BuildType: ${__BuildType}" echo "__TestIntermediatesDir: ${__TestIntermediatesDir}" @@ -305,7 +305,7 @@ build_Tests() MSBUILDDEBUGPATH="${__MsbuildDebugLogsDir}" export MSBUILDDEBUGPATH - __BuildProperties="-p:OSGroup=${__BuildOS} -p:BuildOS=${__BuildOS} -p:BuildArch=${__BuildArch} -p:BuildType=${__BuildType}" + __BuildProperties="-p:TargetOS=${__TargetOS} -p:BuildArch=${__BuildArch} -p:BuildType=${__BuildType}" # ========================================================================================= # === @@ -387,9 +387,9 @@ build_MSBuild_projects() # Set up directories and file names __BuildLogRootName="$subDirectoryName" - __BuildLog="$__LogsDir/${__BuildLogRootName}.${__BuildOS}.${__BuildArch}.${__BuildType}.log" - __BuildWrn="$__LogsDir/${__BuildLogRootName}.${__BuildOS}.${__BuildArch}.${__BuildType}.wrn" - __BuildErr="$__LogsDir/${__BuildLogRootName}.${__BuildOS}.${__BuildArch}.${__BuildType}.err" + __BuildLog="$__LogsDir/${__BuildLogRootName}.${__TargetOS}.${__BuildArch}.${__BuildType}.log" + __BuildWrn="$__LogsDir/${__BuildLogRootName}.${__TargetOS}.${__BuildArch}.${__BuildType}.wrn" + __BuildErr="$__LogsDir/${__BuildLogRootName}.${__TargetOS}.${__BuildArch}.${__BuildType}.err" if [[ "$subDirectoryName" == "Tests_Managed" ]]; then # Execute msbuild managed test build in stages - workaround for excessive data retention in MSBuild ConfigCache @@ -613,12 +613,12 @@ __LogsDir="$__RootBinDir/log" __MsbuildDebugLogsDir="$__LogsDir/MsbuildDebugLogs" # Set the remaining variables based upon the determined build configuration -__BinDir="$__RootBinDir/bin/coreclr/$__BuildOS.$__BuildArch.$__BuildType" +__BinDir="$__RootBinDir/bin/coreclr/$__TargetOS.$__BuildArch.$__BuildType" __PackagesBinDir="$__BinDir/.nuget" __TestDir="$__ProjectDir/tests" -__TestWorkingDir="$__RootBinDir/tests/coreclr/$__BuildOS.$__BuildArch.$__BuildType" -__IntermediatesDir="$__RootBinDir/obj/coreclr/$__BuildOS.$__BuildArch.$__BuildType" -__TestIntermediatesDir="$__RootBinDir/tests/coreclr/obj/$__BuildOS.$__BuildArch.$__BuildType" +__TestWorkingDir="$__RootBinDir/tests/coreclr/$__TargetOS.$__BuildArch.$__BuildType" +__IntermediatesDir="$__RootBinDir/obj/coreclr/$__TargetOS.$__BuildArch.$__BuildType" +__TestIntermediatesDir="$__RootBinDir/tests/coreclr/obj/$__TargetOS.$__BuildArch.$__BuildType" __CrossComponentBinDir="$__BinDir" __CrossCompIntermediatesDir="$__IntermediatesDir/crossgen" @@ -626,7 +626,7 @@ __CrossArch="$__HostArch" if [[ "$__CrossBuild" == 1 ]]; then __CrossComponentBinDir="$__CrossComponentBinDir/$__CrossArch" fi -__CrossgenCoreLibLog="$__LogsDir/CrossgenCoreLib_$__BuildOS.$BuildArch.$__BuildType.log" +__CrossgenCoreLibLog="$__LogsDir/CrossgenCoreLib_$__TargetOS.$BuildArch.$__BuildType.log" __CrossgenExe="$__CrossComponentBinDir/crossgen" # CI_SPECIFIC - On CI machines, $HOME may not be set. In such a case, create a subfolder and set the variable to it. diff --git a/src/coreclr/build.cmd b/src/coreclr/build.cmd index 08fa1f84d21..fac90f6d296 100644 --- a/src/coreclr/build.cmd +++ b/src/coreclr/build.cmd @@ -28,12 +28,12 @@ if defined VS160COMNTOOLS ( :: Note that the msbuild project files (specifically, dir.proj) will use the following variables, if set: :: __BuildArch -- default: x64 :: __BuildType -- default: Debug -:: __BuildOS -- default: Windows_NT +:: __TargetOS -- default: Windows_NT :: __ProjectDir -- default: directory of the dir.props file :: __RepoRootDir -- default: directory two levels above the dir.props file :: __SourceDir -- default: %__ProjectDir%\src\ :: __RootBinDir -- default: %__RepoRootDir%\artifacts\ -:: __BinDir -- default: %__RootBinDir%\%__BuildOS%.%__BuildArch.%__BuildType%\ +:: __BinDir -- default: %__RootBinDir%\%__TargetOS%.%__BuildArch.%__BuildType%\ :: __IntermediatesDir :: __PackagesBinDir -- default: %__BinDir%\.nuget :: @@ -42,7 +42,7 @@ if defined VS160COMNTOOLS ( :: Set the default arguments for build set __BuildArch=x64 set __BuildType=Debug -set __BuildOS=Windows_NT +set __TargetOS=Windows_NT :: Set the various build properties here so that CMake and MSBuild can pick them up set "__ProjectDir=%~dp0" @@ -160,14 +160,14 @@ if [!__PassThroughArgs!]==[] ( if /i "%1" == "-ci" (set __ArcadeScriptArgs="-ci"&set __ErrMsgPrefix=##vso[task.logissue type=error]&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "-OfficialBuildId" (set __OfficialBuildIdArg=/p:OfficialBuildId=%2&set __PassThroughArgs=%__PassThroughArgs% %2&set processedArgs=!processedArgs! %1=%2&shift&shift&goto Arg_Loop) -if /i "%1" == "-alpinedac" (set __BuildCoreLib=0&set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildCrossArchNative=1&set __CrossArch=x64&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=alpine&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) -if /i "%1" == "-linuxdac" (set __BuildCoreLib=0&set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildCrossArchNative=1&set __CrossArch=x64&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=Linux&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "-alpinedac" (set __BuildCoreLib=0&set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildCrossArchNative=1&set __CrossArch=x64&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __TargetOS=alpine&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "-linuxdac" (set __BuildCoreLib=0&set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildCrossArchNative=1&set __CrossArch=x64&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __TargetOS=Linux&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) -if /i "%1" == "-freebsdmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=FreeBSD&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) -if /i "%1" == "-linuxmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=Linux&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) -if /i "%1" == "-netbsdmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=NetBSD&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) -if /i "%1" == "-osxmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=OSX&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) -if /i "%1" == "-windowsmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=Windows_NT&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "-freebsdmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __TargetOS=FreeBSD&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "-linuxmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __TargetOS=Linux&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "-netbsdmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __TargetOS=NetBSD&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "-osxmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __TargetOS=OSX&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "-windowsmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __TargetOS=Windows_NT&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "-nativemscorlib" (set __BuildNativeCoreLib=1&set __BuildCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "-configureonly" (set __ConfigureOnly=1&set __BuildNative=1&set __BuildNativeCoreLib=0&set __BuildCoreLib=0&set __BuildTests=0&set __BuildPackages=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "-skipconfigure" (set __SkipConfigure=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) @@ -190,11 +190,11 @@ if /i "%1" == "-skiprestore" (set __SkipRestoreArg=/p:RestoreDuringBuild REM TODO these are deprecated remove them eventually REM don't add more, use the - syntax instead -if /i "%1" == "freebsdmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=FreeBSD&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) -if /i "%1" == "linuxmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=Linux&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) -if /i "%1" == "netbsdmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=NetBSD&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) -if /i "%1" == "osxmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=OSX&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) -if /i "%1" == "windowsmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __BuildOS=Windows_NT&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "freebsdmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __TargetOS=FreeBSD&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "linuxmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __TargetOS=Linux&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "netbsdmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __TargetOS=NetBSD&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "osxmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __TargetOS=OSX&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) +if /i "%1" == "windowsmscorlib" (set __BuildNativeCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set __TargetOS=Windows_NT&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "nativemscorlib" (set __BuildNativeCoreLib=1&set __BuildCoreLib=0&set __BuildNative=0&set __BuildTests=0&set __BuildPackages=0&set __BuildManagedTools=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "configureonly" (set __ConfigureOnly=1&set __BuildNative=1&set __BuildNativeCoreLib=0&set __BuildCoreLib=0&set __BuildTests=0&set __BuildPackages=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) if /i "%1" == "skipconfigure" (set __SkipConfigure=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop) @@ -263,7 +263,7 @@ if %__BuildTypeDebug%==1 set __BuildType=Debug if %__BuildTypeChecked%==1 set __BuildType=Checked if %__BuildTypeRelease%==1 set __BuildType=Release -set __CommonMSBuildArgs=/p:__BuildOS=%__BuildOS% /p:__BuildType=%__BuildType% /p:__BuildArch=%__BuildArch% !__SkipRestoreArg! !__OfficialBuildIdArg! +set __CommonMSBuildArgs=/p:__TargetOS=%__TargetOS% /p:__BuildType=%__BuildType% /p:__BuildArch=%__BuildArch% !__SkipRestoreArg! !__OfficialBuildIdArg! if %__EnforcePgo%==1 ( if %__BuildArchArm%==1 ( @@ -302,10 +302,10 @@ if %__PgoOptimize%==0 ( set __RestoreOptData=0 ) -set "__BinDir=%__RootBinDir%\bin\coreclr\%__BuildOS%.%__BuildArch%.%__BuildType%" -set "__IntermediatesDir=%__RootBinDir%\obj\coreclr\%__BuildOS%.%__BuildArch%.%__BuildType%" +set "__BinDir=%__RootBinDir%\bin\coreclr\%__TargetOS%.%__BuildArch%.%__BuildType%" +set "__IntermediatesDir=%__RootBinDir%\obj\coreclr\%__TargetOS%.%__BuildArch%.%__BuildType%" set "__ArtifactsIntermediatesDir=%__RepoRootDir%\artifacts\obj\coreclr\" -if "%__NMakeMakefiles%"=="1" (set "__IntermediatesDir=%__RootBinDir%\nmakeobj\%__BuildOS%.%__BuildArch%.%__BuildType%") +if "%__NMakeMakefiles%"=="1" (set "__IntermediatesDir=%__RootBinDir%\nmakeobj\%__TargetOS%.%__BuildArch%.%__BuildType%") set "__PackagesBinDir=%__BinDir%\.nuget" set "__CrossComponentBinDir=%__BinDir%" set "__CrossCompIntermediatesDir=%__IntermediatesDir%\crossgen" @@ -314,7 +314,7 @@ set "__MsbuildDebugLogsDir=%__LogsDir%\MsbuildDebugLogs" if NOT "%__CrossArch%" == "" set __CrossComponentBinDir=%__CrossComponentBinDir%\%__CrossArch% -set "__CrossGenCoreLibLog=%__LogsDir%\CrossgenCoreLib_%__BuildOS%__%__BuildArch%__%__BuildType%.log" +set "__CrossGenCoreLibLog=%__LogsDir%\CrossgenCoreLib_%__TargetOS%__%__BuildArch%__%__BuildType%.log" set "__CrossgenExe=%__CrossComponentBinDir%\crossgen.exe" REM Generate path to be set for CMAKE_INSTALL_PREFIX to contain forward slash @@ -372,7 +372,7 @@ REM ============================================================================ @if defined _echo @echo on echo %__MsgPrefix%Generating native version headers -set "__BinLog=%__LogsDir%\GenerateVersionHeaders_%__BuildOS%__%__BuildArch%__%__BuildType%.binlog" +set "__BinLog=%__LogsDir%\GenerateVersionHeaders_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog" powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" /clp:nosummary %__ArcadeScriptArgs%^ %__RepoRootDir%\eng\empty.csproj /p:NativeVersionFile="%__RootBinDir%\obj\coreclr\_version.h"^ /t:GenerateNativeVersionFile /restore^ @@ -393,7 +393,7 @@ REM ============================================================================ set OptDataProjectFilePath=%__ProjectDir%\src\.nuget\optdata\optdata.csproj if %__RestoreOptData% EQU 1 ( echo %__MsgPrefix%Restoring the OptimizationData Package - set "__BinLog=%__LogsDir%\OptRestore_%__BuildOS%__%__BuildArch%__%__BuildType%.binlog" + set "__BinLog=%__LogsDir%\OptRestore_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog" powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" /clp:nosummary %__ArcadeScriptArgs%^ %OptDataProjectFilePath% /t:Restore^ @@ -409,7 +409,7 @@ if %__RestoreOptData% EQU 1 ( set __PgoOptDataPath= if %__PgoOptimize% EQU 1 ( set PgoDataPackagePathOutputFile="%__IntermediatesDir%\optdatapath.txt" - set "__BinLog=%__LogsDir%\PgoVersionRead_%__BuildOS%__%__BuildArch%__%__BuildType%.binlog" + set "__BinLog=%__LogsDir%\PgoVersionRead_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog" REM Parse the optdata package versions out of msbuild so that we can pass them on to CMake powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" /clp:nosummary %__ArcadeScriptArgs%^ @@ -465,7 +465,7 @@ if %__BuildCrossArchNative% EQU 1 ( REM Scope environment changes start { setlocal - echo %__MsgPrefix%Commencing build of cross architecture native components for %__BuildOS%.%__BuildArch%.%__BuildType% + echo %__MsgPrefix%Commencing build of cross architecture native components for %__TargetOS%.%__BuildArch%.%__BuildType% REM Set the environment for the cross-arch native build set __VCBuildArch=x86_amd64 @@ -480,7 +480,7 @@ if %__BuildCrossArchNative% EQU 1 ( set __CMakeBinDir=%__CrossComponentBinDir% set "__CMakeBinDir=!__CMakeBinDir:\=/!" - set __ExtraCmakeArgs="-DCLR_CROSS_COMPONENTS_BUILD=1" "-DCLR_CMAKE_TARGET_ARCH=%__BuildArch%" "-DCLR_CMAKE_TARGET_OS=%__BuildOS%" "-DCLR_CMAKE_PGO_INSTRUMENT=%__PgoInstrument%" "-DCLR_CMAKE_OPTDATA_PATH=%__PgoOptDataPath%" "-DCLR_CMAKE_PGO_OPTIMIZE=%__PgoOptimize%" "-DCMAKE_SYSTEM_VERSION=10.0" "-DCLR_ENG_NATIVE_DIR=%__RepoRootDir%/eng/native" "-DCLR_REPO_ROOT_DIR=%__RepoRootDir%" + set __ExtraCmakeArgs="-DCLR_CROSS_COMPONENTS_BUILD=1" "-DCLR_CMAKE_TARGET_ARCH=%__BuildArch%" "-DCLR_CMAKE_TARGET_OS=%__TargetOS%" "-DCLR_CMAKE_PGO_INSTRUMENT=%__PgoInstrument%" "-DCLR_CMAKE_OPTDATA_PATH=%__PgoOptDataPath%" "-DCLR_CMAKE_PGO_OPTIMIZE=%__PgoOptimize%" "-DCMAKE_SYSTEM_VERSION=10.0" "-DCLR_ENG_NATIVE_DIR=%__RepoRootDir%/eng/native" "-DCLR_REPO_ROOT_DIR=%__RepoRootDir%" call "%__SourceDir%\pal\tools\gen-buildsys.cmd" "%__ProjectDir%" "%__CrossCompIntermediatesDir%" %__VSVersion% %__CrossArch% !__ExtraCmakeArgs! if not !errorlevel! == 0 ( @@ -498,10 +498,10 @@ if %__BuildCrossArchNative% EQU 1 ( if defined __ConfigureOnly goto SkipCrossCompBuild set __BuildLogRootName=Cross - set "__BuildLog=%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.log" - set "__BuildWrn=%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.wrn" - set "__BuildErr=%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.err" - set "__BinLog=%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.binlog" + set "__BuildLog=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.log" + set "__BuildWrn=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.wrn" + set "__BuildErr=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.err" + set "__BinLog=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog" set "__MsbuildLog=/flp:Verbosity=normal;LogFile=!__BuildLog!" set "__MsbuildWrn=/flp1:WarningsOnly;LogFile=!__BuildWrn!" set "__MsbuildErr=/flp2:ErrorsOnly;LogFile=!__BuildErr!" @@ -533,7 +533,7 @@ if %__BuildNative% EQU 1 ( REM Scope environment changes start { setlocal - echo %__MsgPrefix%Commencing build of native components for %__BuildOS%.%__BuildArch%.%__BuildType% + echo %__MsgPrefix%Commencing build of native components for %__TargetOS%.%__BuildArch%.%__BuildType% REM Set the environment for the native build set __VCBuildArch=x86_amd64 @@ -579,10 +579,10 @@ if %__BuildNative% EQU 1 ( if defined __ConfigureOnly goto SkipNativeBuild set __BuildLogRootName=CoreCLR - set "__BuildLog=%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.log" - set "__BuildWrn=%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.wrn" - set "__BuildErr=%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.err" - set "__BinLog=%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.binlog" + set "__BuildLog=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.log" + set "__BuildWrn=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.wrn" + set "__BuildErr=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.err" + set "__BinLog=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog" set "__MsbuildLog=/flp:Verbosity=normal;LogFile=!__BuildLog!" set "__MsbuildWrn=/flp1:WarningsOnly;LogFile=!__BuildWrn!" set "__MsbuildErr=/flp2:ErrorsOnly;LogFile=!__BuildErr!" @@ -614,7 +614,7 @@ if %__BuildCoreLib% EQU 1 ( REM Scope environment changes start { setlocal - echo %__MsgPrefix%Commencing build of System.Private.CoreLib for %__BuildOS%.%__BuildArch%.%__BuildType% + echo %__MsgPrefix%Commencing build of System.Private.CoreLib for %__TargetOS%.%__BuildArch%.%__BuildType% rem Explicitly set Platform causes conflicts in CoreLib project files. Clear it to allow building from VS x64 Native Tools Command Prompt set Platform= @@ -625,10 +625,10 @@ if %__BuildCoreLib% EQU 1 ( ) set __BuildLogRootName=System.Private.CoreLib - set "__BuildLog=%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.log" - set "__BuildWrn=%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.wrn" - set "__BuildErr=%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.err" - set "__Binlog=%__LogsDir%\!__BuildLogRootName!_%__BuildOS%__%__BuildArch%__%__BuildType%.binlog" + set "__BuildLog=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.log" + set "__BuildWrn=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.wrn" + set "__BuildErr=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.err" + set "__Binlog=%__LogsDir%\!__BuildLogRootName!_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog" set "__MsbuildLog=/flp:Verbosity=normal;LogFile=!__BuildLog!" set "__MsbuildWrn=/flp1:WarningsOnly;LogFile=!__BuildWrn!" set "__MsbuildErr=/flp2:ErrorsOnly;LogFile=!__BuildErr!" @@ -695,7 +695,7 @@ REM Need diasymreader.dll on your path for /CreatePdb set PATH=%PATH%;%WinDir%\Microsoft.Net\Framework64\V4.0.30319;%WinDir%\Microsoft.Net\Framework\V4.0.30319 if %__BuildNativeCoreLib% EQU 1 ( - echo %__MsgPrefix%Generating native image of System.Private.CoreLib for %__BuildOS%.%__BuildArch%.%__BuildType%. Logging to "%__CrossGenCoreLibLog%". + echo %__MsgPrefix%Generating native image of System.Private.CoreLib for %__TargetOS%.%__BuildArch%.%__BuildType%. Logging to "%__CrossGenCoreLibLog%". if exist "%__CrossGenCoreLibLog%" del "%__CrossGenCoreLibLog%" REM Need VS native tools environment for the **target** arch when running instrumented binaries @@ -772,9 +772,9 @@ if %__BuildPackages% EQU 1 ( REM Scope environment changes start { setlocal - echo %__MsgPrefix%Building Packages for %__BuildOS%.%__BuildArch%.%__BuildType% + echo %__MsgPrefix%Building Packages for %__TargetOS%.%__BuildArch%.%__BuildType% - set __BuildLog="%__LogsDir%\Nuget_%__BuildOS%__%__BuildArch%__%__BuildType%.binlog" + set __BuildLog="%__LogsDir%\Nuget_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog" REM The conditions as to what to build are captured in the builds file. REM Package build uses the Arcade system and scripts, relying on it to restore required toolsets as part of build @@ -801,7 +801,7 @@ REM === REM ========================================================================================= if %__BuildTests% EQU 1 ( - echo %__MsgPrefix%Commencing build of tests for %__BuildOS%.%__BuildArch%.%__BuildType% + echo %__MsgPrefix%Commencing build of tests for %__TargetOS%.%__BuildArch%.%__BuildType% set __PriorityArg= if defined __Priority ( @@ -816,7 +816,7 @@ if %__BuildTests% EQU 1 ( goto ExitWithError ) ) else if %__GenerateLayout% EQU 1 ( - echo %__MsgPrefix%Generating layout for %__BuildOS%.%__BuildArch%.%__BuildType% + echo %__MsgPrefix%Generating layout for %__TargetOS%.%__BuildArch%.%__BuildType% set NEXTCMD=call %__ProjectDir%\build-test.cmd %__BuildArch% %__BuildType% generatelayoutonly %__UnprocessedBuildArgs% echo %__MsgPrefix%!NEXTCMD! diff --git a/src/coreclr/build.sh b/src/coreclr/build.sh index 97ed1a15f6f..15e912625b9 100755 --- a/src/coreclr/build.sh +++ b/src/coreclr/build.sh @@ -148,7 +148,7 @@ build_CoreLib_ni() if [[ -e "$__CrossGenCoreLibLog" ]]; then rm "$__CrossGenCoreLibLog" fi - echo "Generating native image of System.Private.CoreLib.dll for $__BuildOS.$__BuildArch.$__BuildType. Logging to \"$__CrossGenCoreLibLog\"." + echo "Generating native image of System.Private.CoreLib.dll for $__TargetOS.$__BuildArch.$__BuildType. Logging to \"$__CrossGenCoreLibLog\"." echo "$__CrossGenExec /Platform_Assemblies_Paths $__CoreLibILDir $__IbcTuning /out $__BinDir/System.Private.CoreLib.dll $__CoreLibILDir/System.Private.CoreLib.dll" "$__CrossGenExec" /nologo /Platform_Assemblies_Paths $__CoreLibILDir $__IbcTuning /out $__BinDir/System.Private.CoreLib.dll $__CoreLibILDir/System.Private.CoreLib.dll >> $__CrossGenCoreLibLog 2>&1 local exit_code="$?" @@ -157,7 +157,7 @@ build_CoreLib_ni() exit "$exit_code" fi - if [[ "$__BuildOS" == "Linux" ]]; then + if [[ "$__TargetOS" == "Linux" ]]; then echo "Generating symbol file for System.Private.CoreLib.dll" echo "$__CrossGenExec /Platform_Assemblies_Paths $__BinDir /CreatePerfMap $__BinDir $__BinDir/System.Private.CoreLib.dll" "$__CrossGenExec" /nologo /Platform_Assemblies_Paths $__BinDir /CreatePerfMap $__BinDir $__BinDir/System.Private.CoreLib.dll >> $__CrossGenCoreLibLog 2>&1 @@ -181,7 +181,7 @@ build_CoreLib() return fi - echo "Commencing build of managed components for $__BuildOS.$__BuildArch.$__BuildType" + echo "Commencing build of managed components for $__TargetOS.$__BuildArch.$__BuildType" # Invoke MSBuild __ExtraBuildArgs="" @@ -207,7 +207,7 @@ build_CoreLib() "$__RepoRootDir/eng/common/msbuild.sh" /clp:nosummary $__ArcadeScriptArgs \ $__ProjectDir/src/build.proj \ /p:PortableBuild=true /maxcpucount \ - /flp:Verbosity=normal\;LogFile=$__LogsDir/System.Private.CoreLib_$__BuildOS__$__BuildArch__$__BuildType.log \ + /flp:Verbosity=normal\;LogFile=$__LogsDir/System.Private.CoreLib_$__TargetOS__$__BuildArch__$__BuildType.log \ -bl:"$__LogsDir/System.Private.CoreLib_$__ConfigTriplet.binlog" \ /p:__IntermediatesDir=$__IntermediatesDir /p:__RootBinDir=$__RootBinDir \ $__CommonMSBuildArgs $__ExtraBuildArgs $__UnprocessedBuildArgs @@ -294,13 +294,13 @@ generate_NugetPackages() return fi - echo "Generating nuget packages for $__BuildOS" + echo "Generating nuget packages for $__TargetOS" echo "DistroRid is $__DistroRid" echo "ROOTFS_DIR is $ROOTFS_DIR" # Build the packages # Package build uses the Arcade system and scripts, relying on it to restore required toolsets as part of build "$__RepoRootDir"/eng/common/build.sh -r -b -projects "$__SourceDir"/.nuget/packages.builds \ - -verbosity minimal -bl:"$__LogsDir/Nuget_$__BuildOS__$__BuildArch__$__BuildType.binlog" \ + -verbosity minimal -bl:"$__LogsDir/Nuget_$__TargetOS__$__BuildArch__$__BuildType.binlog" \ /p:PortableBuild=true \ /p:"__IntermediatesDir=$__IntermediatesDir" /p:"__RootBinDir=$__RootBinDir" /p:"__DoCrossArchBuild=$__CrossBuild" \ $__CommonMSBuildArgs $__UnprocessedBuildArgs @@ -461,12 +461,12 @@ fi # Set dependent variables __LogsDir="$__RootBinDir/log/$__BuildType" __MsbuildDebugLogsDir="$__LogsDir/MsbuildDebugLogs" -__ConfigTriplet=$__BuildOS__$__BuildArch__$__BuildType +__ConfigTriplet=$__TargetOS__$__BuildArch__$__BuildType # Set the remaining variables based upon the determined build configuration -__BinDir="$__RootBinDir/bin/coreclr/$__BuildOS.$__BuildArch.$__BuildType" +__BinDir="$__RootBinDir/bin/coreclr/$__TargetOS.$__BuildArch.$__BuildType" __PackagesBinDir="$__BinDir/.nuget" -__IntermediatesDir="$__RootBinDir/obj/coreclr/$__BuildOS.$__BuildArch.$__BuildType" +__IntermediatesDir="$__RootBinDir/obj/coreclr/$__TargetOS.$__BuildArch.$__BuildType" __ArtifactsIntermediatesDir="$__RepoRootDir/artifacts/obj/coreclr" export __IntermediatesDir __ArtifactsIntermediatesDir diff --git a/src/coreclr/crossgen-corelib.cmd b/src/coreclr/crossgen-corelib.cmd index 7cd05c3e8e0..f47aa179909 100644 --- a/src/coreclr/crossgen-corelib.cmd +++ b/src/coreclr/crossgen-corelib.cmd @@ -13,11 +13,11 @@ set __ThisScriptDir="%~dp0" :: Note that the msbuild project files (specifically, dir.proj) will use the following variables, if set: :: __BuildArch -- default: x64 :: __BuildType -- default: Debug -:: __BuildOS -- default: Windows_NT +:: __TargetOS -- default: Windows_NT :: __ProjectDir -- default: directory of the dir.props file :: __RepoRootDir -- default: directory two levels above the dir.props file :: __RootBinDir -- default: %__RepoRootDir%\artifacts\ -:: __BinDir -- default: %__RootBinDir%\%__BuildOS%.%__BuildArch.%__BuildType%\ +:: __BinDir -- default: %__RootBinDir%\%__TargetOS%.%__BuildArch.%__BuildType%\ :: __IntermediatesDir :: __PackagesBinDir -- default: %__BinDir%\.nuget :: @@ -26,7 +26,7 @@ set __ThisScriptDir="%~dp0" :: Set the default arguments for build set __BuildArch=x64 set __BuildType=Debug -set __BuildOS=Windows_NT +set __TargetOS=Windows_NT set "__ProjectDir=%~dp0" :: remove trailing slash @@ -120,13 +120,13 @@ if %__BuildTypeDebug%==1 set __BuildType=Debug if %__BuildTypeChecked%==1 set __BuildType=Checked if %__BuildTypeRelease%==1 set __BuildType=Release -set "__BinDir=%__RootBinDir%\bin\coreclr\%__BuildOS%.%__BuildArch%.%__BuildType%" -set "__IntermediatesDir=%__RootBinDir%\obj\coreclr\%__BuildOS%.%__BuildArch%.%__BuildType%" +set "__BinDir=%__RootBinDir%\bin\coreclr\%__TargetOS%.%__BuildArch%.%__BuildType%" +set "__IntermediatesDir=%__RootBinDir%\obj\coreclr\%__TargetOS%.%__BuildArch%.%__BuildType%" set "__CrossComponentBinDir=%__BinDir%" if NOT "%__CrossArch%" == "" set __CrossComponentBinDir=%__CrossComponentBinDir%\%__CrossArch% -set "__CrossGenCoreLibLog=%__LogsDir%\CrossgenCoreLib_%__BuildOS%__%__BuildArch%__%__BuildType%.log" +set "__CrossGenCoreLibLog=%__LogsDir%\CrossgenCoreLib_%__TargetOS%__%__BuildArch%__%__BuildType%.log" set "__CrossgenExe=%__CrossComponentBinDir%\crossgen.exe" if not exist "%__BinDir%" md "%__BinDir%" @@ -167,7 +167,7 @@ if not defined VSINSTALLDIR ( ) if not exist "!VSINSTALLDIR!DIA SDK" goto NoDIA -echo %__MsgPrefix%Generating native image of System.Private.CoreLib for %__BuildOS%.%__BuildArch%.%__BuildType%. Logging to "%__CrossGenCoreLibLog%". +echo %__MsgPrefix%Generating native image of System.Private.CoreLib for %__TargetOS%.%__BuildArch%.%__BuildType%. Logging to "%__CrossGenCoreLibLog%". if exist "%__CrossGenCoreLibLog%" del "%__CrossGenCoreLibLog%" REM Need VS native tools environment for the **target** arch when running instrumented binaries diff --git a/src/coreclr/crossgen-corelib.sh b/src/coreclr/crossgen-corelib.sh index 46bed1f6bb3..570f22db105 100755 --- a/src/coreclr/crossgen-corelib.sh +++ b/src/coreclr/crossgen-corelib.sh @@ -24,7 +24,7 @@ build_CoreLib_ni() if [[ -e "$__CrossGenCoreLibLog" ]]; then rm "$__CrossGenCoreLibLog" fi - echo "Generating native image of System.Private.CoreLib.dll for $__BuildOS.$__BuildArch.$__BuildType. Logging to \"$__CrossGenCoreLibLog\"." + echo "Generating native image of System.Private.CoreLib.dll for $__TargetOS.$__BuildArch.$__BuildType. Logging to \"$__CrossGenCoreLibLog\"." echo "$__CrossGenExec /Platform_Assemblies_Paths $__CoreLibILDir $__IbcTuning /out $__BinDir/System.Private.CoreLib.dll $__CoreLibILDir/System.Private.CoreLib.dll" "$__CrossGenExec" /nologo /Platform_Assemblies_Paths $__CoreLibILDir $__IbcTuning /out $__BinDir/System.Private.CoreLib.dll $__CoreLibILDir/System.Private.CoreLib.dll >> $__CrossGenCoreLibLog 2>&1 local exit_code="$?" @@ -33,7 +33,7 @@ build_CoreLib_ni() exit "$exit_code" fi - if [[ "$__BuildOS" == "Linux" ]]; then + if [[ "$__TargetOS" == "Linux" ]]; then echo "Generating symbol file for System.Private.CoreLib.dll" echo "$__CrossGenExec /Platform_Assemblies_Paths $__BinDir /CreatePerfMap $__BinDir $__BinDir/System.Private.CoreLib.dll" "$__CrossGenExec" /nologo /Platform_Assemblies_Paths $__BinDir /CreatePerfMap $__BinDir $__BinDir/System.Private.CoreLib.dll >> $__CrossGenCoreLibLog 2>&1 @@ -102,14 +102,14 @@ fi __LogsDir="$__RootBinDir/log/$__BuildType" # Set the remaining variables based upon the determined build configuration -__BinDir="$__RootBinDir/bin/coreclr/$__BuildOS.$__BuildArch.$__BuildType" +__BinDir="$__RootBinDir/bin/coreclr/$__TargetOS.$__BuildArch.$__BuildType" __CrossComponentBinDir="$__BinDir" __CrossArch="$__HostArch" if [[ "$__CrossBuild" == 1 ]]; then __CrossComponentBinDir="$__CrossComponentBinDir/$__CrossArch" fi -__CrossGenCoreLibLog="$__LogsDir/CrossgenCoreLib_$__BuildOS.$__BuildArch.$__BuildType.log" +__CrossGenCoreLibLog="$__LogsDir/CrossgenCoreLib_$__TargetOS.$__BuildArch.$__BuildType.log" # Crossgen System.Private.CoreLib diff --git a/src/coreclr/dir.common.props b/src/coreclr/dir.common.props index 7185a3c6ce5..e5640a6ddce 100644 --- a/src/coreclr/dir.common.props +++ b/src/coreclr/dir.common.props @@ -21,20 +21,14 @@ <BuildType Condition="'$(BuildType)' == 'release'">Release</BuildType> <BuildType Condition="'$(BuildType)' == 'checked'">Checked</BuildType> - <BuildOS>$(__BuildOS)</BuildOS> - <BuildOS Condition="'$(BuildOS)' == ''">$(OSGroup)</BuildOS> - <BuildOS Condition="'$(BuildOS)' == '' And '$([MSBuild]::IsOSPlatform(Windows))' == 'true'">Windows_NT</BuildOS> - <BuildOS Condition="'$(BuildOS)' == '' And '$([MSBuild]::IsOSPlatform(Linux))' == 'true'">Linux</BuildOS> - <BuildOS Condition="'$(BuildOS)' == '' And '$([MSBuild]::IsOSPlatform(OSX))' == 'true'">OSX</BuildOS> - - <!-- TODO: converge on one property for BuildOS and __BuildOS (and similar), and remove these extra lines. --> - <__BuildOS>$(BuildOS)</__BuildOS> + <!-- TODO: converge on one property for TargetOS and __TargetOS (and similar), and remove these extra lines. --> + <__TargetOS>$(TargetOS)</__TargetOS> <__BuildArch>$(BuildArch)</__BuildArch> <Configuration Condition="'$(Configuration)' == ''">$(BuildType)</Configuration> <Platform Condition="'$(Platform)' == ''">$(BuildArch)</Platform> - <PlatformConfigPathPart>$(BuildOS).$(BuildArch).$(BuildType)</PlatformConfigPathPart> + <PlatformConfigPathPart>$(TargetOS).$(BuildArch).$(BuildType)</PlatformConfigPathPart> </PropertyGroup> <!-- Common properties --> @@ -67,11 +61,11 @@ <!-- Set up common target properties that we use to conditionally include sources --> <PropertyGroup> - <TargetsFreeBSD Condition="'$(BuildOS)' == 'FreeBSD'">true</TargetsFreeBSD> - <TargetsLinux Condition="'$(BuildOS)' == 'Linux'">true</TargetsLinux> - <TargetsNetBSD Condition="'$(BuildOS)' == 'NetBSD'">true</TargetsNetBSD> - <TargetsOSX Condition="'$(BuildOS)' == 'OSX'">true</TargetsOSX> - <TargetsWindows Condition="'$(BuildOS)' == 'Windows_NT'">true</TargetsWindows> + <TargetsFreeBSD Condition="'$(TargetOS)' == 'FreeBSD'">true</TargetsFreeBSD> + <TargetsLinux Condition="'$(TargetOS)' == 'Linux'">true</TargetsLinux> + <TargetsNetBSD Condition="'$(TargetOS)' == 'NetBSD'">true</TargetsNetBSD> + <TargetsOSX Condition="'$(TargetOS)' == 'OSX'">true</TargetsOSX> + <TargetsWindows Condition="'$(TargetOS)' == 'Windows_NT'">true</TargetsWindows> <TargetsUnix Condition="'$(TargetsFreeBSD)' == 'true' or '$(TargetsLinux)' == 'true' or '$(TargetsNetBSD)' == 'true' or '$(TargetsOSX)' == 'true'">true</TargetsUnix> diff --git a/src/coreclr/src/.nuget/Directory.Build.props b/src/coreclr/src/.nuget/Directory.Build.props index adaa4b2e06b..05987926860 100644 --- a/src/coreclr/src/.nuget/Directory.Build.props +++ b/src/coreclr/src/.nuget/Directory.Build.props @@ -14,7 +14,7 @@ <!-- Distro rid is passed as runtimeos-arch--> <_parseDistroRid>$(__DistroRid)</_parseDistroRid> - <_parseDistroRid Condition="'$(_parseDistroRid)' == '' and '$(__BuildOS)' == 'OSX'">osx.10.12-x64</_parseDistroRid> + <_parseDistroRid Condition="'$(_parseDistroRid)' == '' and '$(__TargetOS)' == 'OSX'">osx.10.12-x64</_parseDistroRid> <_distroRidIndex>$(_parseDistroRid.LastIndexOfAny("-"))</_distroRidIndex> <_archRidIndex>$([MSBuild]::Add($(_distroRidIndex), 1))</_archRidIndex> <OSRid Condition="'$(OSRid)' == '' and '$(_distroRidIndex)' != '-1'">$(_parseDistroRid.SubString(0, $(_distroRidIndex)))</OSRid> @@ -43,7 +43,7 @@ <_derivedPackageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == '' and '$(_runtimeOSFamily)' == 'osx'">OSX</_derivedPackageTargetOSGroup> <_derivedPackageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == '' and '$(_runtimeOSFamily)' == 'android'">Android</_derivedPackageTargetOSGroup> <_derivedPackageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == '' and '$(_runtimeOSFamily)' == 'win'">Windows_NT</_derivedPackageTargetOSGroup> - <_derivedPackageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == '' and '$(__BuildOS)' != ''">$(__BuildOS)</_derivedPackageTargetOSGroup> + <_derivedPackageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == '' and '$(__TargetOS)' != ''">$(__TargetOS)</_derivedPackageTargetOSGroup> <_derivedPackageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == ''">Linux</_derivedPackageTargetOSGroup> <_isSupportedOSGroup Condition="!$(SupportedPackageOSGroups.Contains(';$(_derivedPackageTargetOSGroup);'))">false</_isSupportedOSGroup> diff --git a/src/coreclr/src/.nuget/optdata/optdata.csproj b/src/coreclr/src/.nuget/optdata/optdata.csproj index 4249df15f46..20a06457ce6 100644 --- a/src/coreclr/src/.nuget/optdata/optdata.csproj +++ b/src/coreclr/src/.nuget/optdata/optdata.csproj @@ -3,10 +3,10 @@ <PropertyGroup> <TargetFramework>$(NetCoreAppCurrent)</TargetFramework> <DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences> - <OptimizationDataSupported Condition="'$(BuildOS)' == 'Windows_NT' And ('$(BuildArch)' == 'x64' Or '$(BuildArch)' == 'x86')">True</OptimizationDataSupported> - <OptimizationDataSupported Condition="'$(BuildOS)' == 'Linux' And '$(BuildArch)' == 'x64'">True</OptimizationDataSupported> + <OptimizationDataSupported Condition="'$(TargetOS)' == 'Windows_NT' And ('$(BuildArch)' == 'x64' Or '$(BuildArch)' == 'x86')">True</OptimizationDataSupported> + <OptimizationDataSupported Condition="'$(TargetOS)' == 'Linux' And '$(BuildArch)' == 'x64'">True</OptimizationDataSupported> <RuntimeIdentifiers>win7-x64;win7-x86;linux-x64</RuntimeIdentifiers> - <_BuildOSArchLowercase>$(BuildOS.ToLower())-$(BuildArch.ToLower())</_BuildOSArchLowercase> + <_TargetOSArchLowercase>$(TargetOS.ToLower())-$(BuildArch.ToLower())</_TargetOSArchLowercase> </PropertyGroup> <ItemGroup> @@ -32,7 +32,7 @@ <Error Condition="'$(PgoDataPackagePathOutputFile)'==''" Text="PgoDataPackagePathOutputFile must be passed as a property." /> <PropertyGroup> - <PgoPackagePath>$([MSBuild]::NormalizePath($(Pkgoptimization_PGO_CoreCLR),../../,optimization.$(_BuildOSArchLowercase).pgo.coreclr,$(optimizationPGOCoreCLRVersion)))</PgoPackagePath> + <PgoPackagePath>$([MSBuild]::NormalizePath($(Pkgoptimization_PGO_CoreCLR),../../,optimization.$(_TargetOSArchLowercase).pgo.coreclr,$(optimizationPGOCoreCLRVersion)))</PgoPackagePath> </PropertyGroup> <Error Condition="!Exists('$(PgoPackagePath)') And '$(OptimizationDataSupported)' == 'True'" Text="Unable to locate restored PGO package. Maybe the platform-specific package naming changed?" /> diff --git a/src/coreclr/src/System.Private.CoreLib/System.Private.CoreLib.csproj b/src/coreclr/src/System.Private.CoreLib/System.Private.CoreLib.csproj index 95b19a9ce28..b644ed4045a 100644 --- a/src/coreclr/src/System.Private.CoreLib/System.Private.CoreLib.csproj +++ b/src/coreclr/src/System.Private.CoreLib/System.Private.CoreLib.csproj @@ -416,8 +416,8 @@ </Compile> </ItemGroup> <Import Project="$(LibrariesProjectRoot)\System.Private.CoreLib\src\System.Private.CoreLib.Shared.projitems" Label="Shared" /> - <PropertyGroup Condition="'$(BuildOS)' == 'Windows_NT'"> - <OSGroup>Windows_NT</OSGroup> + <PropertyGroup Condition="'$(TargetOS)' == 'Windows_NT'"> + <TargetOS>Windows_NT</TargetOS> </PropertyGroup> <PropertyGroup> <FeatureAsyncCausalityTracer Condition="'$(FeatureCominterop)' == 'true'">true</FeatureAsyncCausalityTracer> diff --git a/src/coreclr/tests/Directory.Build.props b/src/coreclr/tests/Directory.Build.props index 691df71028b..6c5f47c7e05 100644 --- a/src/coreclr/tests/Directory.Build.props +++ b/src/coreclr/tests/Directory.Build.props @@ -21,10 +21,10 @@ <!-- Common properties --> <PropertyGroup> <RootBinDir>$(MSBuildThisFileDirectory)..\..\..\artifacts\</RootBinDir> - <BinDir>$(RootBinDir)bin\coreclr\$(BuildOS).$(BuildArch).$(BuildType)\</BinDir> + <BinDir>$(RootBinDir)bin\coreclr\$(TargetOS).$(BuildArch).$(BuildType)\</BinDir> <TestWorkingDir>$(__TestWorkingDir)\</TestWorkingDir> - <TestWorkingDir>$(RootBinDir)tests\coreclr\$(BuildOS).$(BuildArch).$(BuildType)\</TestWorkingDir> + <TestWorkingDir>$(RootBinDir)tests\coreclr\$(TargetOS).$(BuildArch).$(BuildType)\</TestWorkingDir> <AltJitArch>$(__AltJitArch)</AltJitArch> </PropertyGroup> @@ -34,8 +34,8 @@ <!-- When not using the SDK, we want to set this property here so that BuildVersionFile gets the correct value. --> <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == '' Or '$(UsingMicrosoftNETSdk)' != 'true'">$(RootBinDir)obj\</BaseIntermediateOutputPath> - <IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(BaseIntermediateOutputPath)\$(BuildOS).$(BuildArch).$(BuildType)</IntermediateOutputPath> - <OutputPath Condition="'$(OutputPath)' == ''">$(BaseIntermediateOutputPath)\coreclr\$(BuildOS).$(BuildArch).$(BuildType)</OutputPath> + <IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(BaseIntermediateOutputPath)\$(TargetOS).$(BuildArch).$(BuildType)</IntermediateOutputPath> + <OutputPath Condition="'$(OutputPath)' == ''">$(BaseIntermediateOutputPath)\coreclr\$(TargetOS).$(BuildArch).$(BuildType)</OutputPath> </PropertyGroup> <!-- Targeting Package paths --> diff --git a/src/coreclr/tests/build.proj b/src/coreclr/tests/build.proj index 25a9ecdffc7..6bb478984d0 100644 --- a/src/coreclr/tests/build.proj +++ b/src/coreclr/tests/build.proj @@ -27,7 +27,7 @@ <Target Name="BuildTargetingPack" AfterTargets="BatchRestorePackages" Condition="$(__SkipTargetingPackBuild) != 'true'"> <Message Text="Building Targeting Pack" Importance="High" /> - <Error Text="BuildOS has not been specified. Please do that then run build again." Condition="'$(BuildOS)' == 'AnyOS'" /> + <Error Text="TargetOS has not been specified. Please do that then run build again." Condition="'$(TargetOS)' == 'AnyOS'" /> <MSBuild Projects="$(MSBuildThisFileDirectory)external\external.csproj" Targets="Build" /> </Target> @@ -45,7 +45,7 @@ <Target Name="RestorePackage"> <PropertyGroup> - <_ConfigurationProperties>/p:__BuildOS=$(__BuildOS) /p:__BuildArch=$(__BuildArch) /p:__BuildType=$(__BuildType)</_ConfigurationProperties> + <_ConfigurationProperties>/p:__TargetOS=$(__TargetOS) /p:__BuildArch=$(__BuildArch) /p:__BuildType=$(__BuildType)</_ConfigurationProperties> <DotnetRestoreCommand Condition="'$(__DistroRid)' == ''">"$(DotNetTool)" restore $(RestoreProj) $(PackageVersionArg) /p:SetTFMForRestore=true $(_ConfigurationProperties) $(__SkipFXRestoreArg)</DotnetRestoreCommand> <DotnetRestoreCommand Condition="'$(__DistroRid)' != ''">"$(DotNetTool)" restore -r $(__DistroRid) $(RestoreProj) $(PackageVersionArg) /p:SetTFMForRestore=true $(_ConfigurationProperties) $(__SkipFXRestoreArg)</DotnetRestoreCommand> </PropertyGroup> diff --git a/src/coreclr/tests/dir.common.props b/src/coreclr/tests/dir.common.props index 41c42a2466a..c2560603383 100644 --- a/src/coreclr/tests/dir.common.props +++ b/src/coreclr/tests/dir.common.props @@ -10,7 +10,7 @@ tests/dir.props directly - these should eventually go away. --> <PropertyGroup> - <OSPlatformConfig>$(BuildOS).$(BuildArch).$(Configuration)</OSPlatformConfig> + <OSPlatformConfig>$(TargetOS).$(BuildArch).$(Configuration)</OSPlatformConfig> <TestSrcDir>$(MSBuildThisFileDirectory)src</TestSrcDir> <BuildProjectRelativeDir>$([MSBuild]::MakeRelative($(TestSrcDir), $(MSBuildProjectDirectory)))\$(MSBuildProjectName)\</BuildProjectRelativeDir> diff --git a/src/coreclr/tests/helixpublishwitharcade.proj b/src/coreclr/tests/helixpublishwitharcade.proj index 020c8f130d7..c17019aefb8 100644 --- a/src/coreclr/tests/helixpublishwitharcade.proj +++ b/src/coreclr/tests/helixpublishwitharcade.proj @@ -16,7 +16,7 @@ <_PropertiesToPass> __BuildArch=$(__BuildArch); - __BuildOS=$(__BuildOS); + __TargetOS=$(__TargetOS); __BuildType=$(__BuildType); Creator=$(_Creator); HelixAccessToken=$(_HelixAccessToken); @@ -176,8 +176,8 @@ <GcSimulatorTests Condition=" '$(GcSimulatorTests)' != 'true' ">false</GcSimulatorTests> <TestRunNamePrefix Condition=" '$(RunCrossGen)' == 'true' ">R2R </TestRunNamePrefix> <TestRunNamePrefix Condition=" '$(RunCrossGen2)' == 'true' ">R2R-CG2 </TestRunNamePrefix> - <TestRunNamePrefix Condition=" '$(Scenario)' == 'normal' ">$(TestRunNamePrefix)$(BuildOS) $(BuildArch) $(BuildType) @ </TestRunNamePrefix> - <TestRunNamePrefix Condition=" '$(Scenario)' != 'normal' ">$(TestRunNamePrefix)$(BuildOS) $(BuildArch) $(BuildType) $(Scenario) @ </TestRunNamePrefix> + <TestRunNamePrefix Condition=" '$(Scenario)' == 'normal' ">$(TestRunNamePrefix)$(TargetOS) $(BuildArch) $(BuildType) @ </TestRunNamePrefix> + <TestRunNamePrefix Condition=" '$(Scenario)' != 'normal' ">$(TestRunNamePrefix)$(TargetOS) $(BuildArch) $(BuildType) $(Scenario) @ </TestRunNamePrefix> <TimeoutPerTestInMilliseconds Condition=" '$(TimeoutPerTestInMinutes)' != '' ">$([System.TimeSpan]::FromMinutes($(TimeoutPerTestInMinutes)).TotalMilliseconds)</TimeoutPerTestInMilliseconds> <WaitForWorkItemCompletion>true</WaitForWorkItemCompletion> <_XUnitParallelMode>collections</_XUnitParallelMode> @@ -216,12 +216,12 @@ <HelixPreCommand Include="export __TestEnv=$HELIX_WORKITEM_PAYLOAD/$(TestEnvFileName)" /> <HelixPreCommand Include="export __TestTimeout=$(TimeoutPerTestInMilliseconds)" Condition=" '$(TimeoutPerTestInMilliseconds)' != '' " /> <HelixPreCommand Include="export __CollectDumps=1" /> - <HelixPreCommand Include="export __CrashDumpFolder=$HELIX_DUMP_FOLDER" Condition=" '$(BuildOS)' != 'OSX' " /> - <HelixPreCommand Include="export __CrashDumpFolder=/cores" Condition=" '$(BuildOS)' == 'OSX' " /> <!-- Helix doesn't specify the dump folder for OSX 10.14, so we need to manually specify it. Tracked by dotnet/core-eng#7872 --> + <HelixPreCommand Include="export __CrashDumpFolder=$HELIX_DUMP_FOLDER" Condition=" '$(TargetOS)' != 'OSX' " /> + <HelixPreCommand Include="export __CrashDumpFolder=/cores" Condition=" '$(TargetOS)' == 'OSX' " /> <!-- Helix doesn't specify the dump folder for OSX 10.14, so we need to manually specify it. Tracked by dotnet/core-eng#7872 --> <HelixPreCommand Include="cat $__TestEnv" /> - <HelixPreCommand Include="sudo bash -c 'echo $HELIX_DUMP_FOLDER/core.%u.%p > /proc/sys/kernel/core_pattern'" Condition=" '$(BuildOS)' != 'OSX' " /> - <HelixPreCommand Include="ulimit -c unlimited" Condition=" '$(BuildOS)' == 'OSX' " /> + <HelixPreCommand Include="sudo bash -c 'echo $HELIX_DUMP_FOLDER/core.%u.%p > /proc/sys/kernel/core_pattern'" Condition=" '$(TargetOS)' != 'OSX' " /> + <HelixPreCommand Include="ulimit -c unlimited" Condition=" '$(TargetOS)' == 'OSX' " /> </ItemGroup> <PropertyGroup> diff --git a/src/coreclr/tests/override.targets b/src/coreclr/tests/override.targets index 0173750d95b..b45306f93cc 100644 --- a/src/coreclr/tests/override.targets +++ b/src/coreclr/tests/override.targets @@ -14,7 +14,7 @@ > <ItemGroup> - <ReferencePath Include="$(RootRepoDir)\artifacts\bin\coreclr\$(BuildOS).$(BuildArch).$(BuildType)\System.Private.CoreLib.dll" /> + <ReferencePath Include="$(RootRepoDir)\artifacts\bin\coreclr\$(TargetOS).$(BuildArch).$(BuildType)\System.Private.CoreLib.dll" /> </ItemGroup> </Target> diff --git a/src/coreclr/tests/publishdependency.targets b/src/coreclr/tests/publishdependency.targets index 2df245cde3f..13a4f730000 100644 --- a/src/coreclr/tests/publishdependency.targets +++ b/src/coreclr/tests/publishdependency.targets @@ -21,7 +21,7 @@ </ItemGroup> <PropertyGroup> - <ProductDestination>$(RootRepoDir)\artifacts\bin\coreclr\$(BuildOS).$(BuildArch).$(BuildType)</ProductDestination> + <ProductDestination>$(RootRepoDir)\artifacts\bin\coreclr\$(TargetOS).$(BuildArch).$(BuildType)</ProductDestination> <RefDestination>$(ProductDestination)\ref</RefDestination> </PropertyGroup> diff --git a/src/coreclr/tests/runtest.cmd b/src/coreclr/tests/runtest.cmd index 85f0e4a7784..c80629d28e0 100644 --- a/src/coreclr/tests/runtest.cmd +++ b/src/coreclr/tests/runtest.cmd @@ -10,7 +10,7 @@ set __ThisScriptDir="%~dp0" :: Set the default arguments set __BuildArch=x64 set __BuildType=Debug -set __BuildOS=Windows_NT +set __TargetOS=Windows_NT set "__ProjectDir=%~dp0" :: remove trailing slash @@ -108,8 +108,8 @@ if defined __TestEnv (if not exist %__TestEnv% echo %__MsgPrefix%Error: Test Env :: Set the remaining variables based upon the determined configuration set __MSBuildBuildArch=%__BuildArch% -set "__BinDir=%__RootBinDir%\bin\coreclr\%__BuildOS%.%__BuildArch%.%__BuildType%" -set "__TestWorkingDir=%__RootBinDir%\tests\coreclr\%__BuildOS%.%__BuildArch%.%__BuildType%" +set "__BinDir=%__RootBinDir%\bin\coreclr\%__TargetOS%.%__BuildArch%.%__BuildType%" +set "__TestWorkingDir=%__RootBinDir%\tests\coreclr\%__TargetOS%.%__BuildArch%.%__BuildType%" :: Default global test environment variables :: REVIEW: are these ever expected to be defined on entry to this script? Why? By whom? @@ -208,8 +208,8 @@ REM Set up the directory for MSBuild debug logs. set MSBUILDDEBUGPATH=%__MsbuildDebugLogsDir% REM These log files are created automatically by the test run process. Q: what do they depend on being set? -set __TestRunHtmlLog=%__LogsDir%\TestRun_%__BuildOS%__%__BuildArch%__%__BuildType%.html -set __TestRunXmlLog=%__LogsDir%\TestRun_%__BuildOS%__%__BuildArch%__%__BuildType%.xml +set __TestRunHtmlLog=%__LogsDir%\TestRun_%__TargetOS%__%__BuildArch%__%__BuildType%.html +set __TestRunXmlLog=%__LogsDir%\TestRun_%__TargetOS%__%__BuildArch%__%__BuildType%.xml REM Prepare the Test Drop @@ -377,9 +377,9 @@ REM ============================================================================ echo %__MsgPrefix%Invoking msbuild -set "__BuildLog=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.log" -set "__BuildWrn=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.wrn" -set "__BuildErr=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.err" +set "__BuildLog=%__LogsDir%\%__BuildLogRootName%_%__TargetOS%__%__BuildArch%__%__BuildType%.log" +set "__BuildWrn=%__LogsDir%\%__BuildLogRootName%_%__TargetOS%__%__BuildArch%__%__BuildType%.wrn" +set "__BuildErr=%__LogsDir%\%__BuildLogRootName%_%__TargetOS%__%__BuildArch%__%__BuildType%.err" set __msbuildLogArgs=^ /fileloggerparameters:Verbosity=normal;LogFile="%__BuildLog%";Append ^ diff --git a/src/coreclr/tests/runtest.py b/src/coreclr/tests/runtest.py index 52a446b8381..7ae9c97e58d 100755 --- a/src/coreclr/tests/runtest.py +++ b/src/coreclr/tests/runtest.py @@ -637,7 +637,7 @@ def call_msbuild(args): if g_verbose: command += ["/verbosity:diag"] - command += ["/p:__BuildOS=%s" % args.host_os, + command += ["/p:__TargetOS=%s" % args.host_os, "/p:__BuildArch=%s" % args.arch, "/p:__BuildType=%s" % args.build_type, "/p:__LogsDir=%s" % args.logs_dir] diff --git a/src/coreclr/tests/scripts/arm32_ci_script.sh b/src/coreclr/tests/scripts/arm32_ci_script.sh index 87d3b08043c..5ec34eb17a1 100755 --- a/src/coreclr/tests/scripts/arm32_ci_script.sh +++ b/src/coreclr/tests/scripts/arm32_ci_script.sh @@ -421,7 +421,7 @@ __coreFxNativeBinDir= __coreFxBinDir= __testDirFile= __verboseFlag= -__buildOS="Linux" +__targetOS="Linux" __buildArch="armel" __linuxCodeName="tizen" __skipRootFS=0 @@ -540,7 +540,7 @@ elif [[ "$__buildConfig" == "checked" ]]; then else __buildConfig="Debug" fi -__buildDirName="$__buildOS.$__buildArch.$__buildConfig" +__buildDirName="$__targetOS.$__buildArch.$__buildConfig" #Define emulator paths __TempFolder="bindings/tmp/arm32_ci_temp" diff --git a/src/coreclr/tests/scripts/x86_ci_script.sh b/src/coreclr/tests/scripts/x86_ci_script.sh index 86af1d161eb..b37bf5ca7d5 100755 --- a/src/coreclr/tests/scripts/x86_ci_script.sh +++ b/src/coreclr/tests/scripts/x86_ci_script.sh @@ -32,7 +32,7 @@ elif [[ "$__buildConfig" == "checked" ]]; then else __buildConfig="Debug" fi -__buildDirName="$__buildOS.$__buildArch.$__buildConfig" +__buildDirName="$__targetOS.$__buildArch.$__buildConfig" set -x set -e diff --git a/src/coreclr/tests/setup-stress-dependencies.sh b/src/coreclr/tests/setup-stress-dependencies.sh index c747826732b..c4516facbf2 100755 --- a/src/coreclr/tests/setup-stress-dependencies.sh +++ b/src/coreclr/tests/setup-stress-dependencies.sh @@ -106,38 +106,38 @@ fi OSName=$(uname -s) case "$OSName" in Linux) - __BuildOS=Linux + __TargetOS=Linux __HostOS=Linux ;; Darwin) - __BuildOS=OSX + __TargetOS=OSX __HostOS=OSX ;; FreeBSD) - __BuildOS=FreeBSD + __TargetOS=FreeBSD __HostOS=FreeBSD ;; OpenBSD) - __BuildOS=OpenBSD + __TargetOS=OpenBSD __HostOS=OpenBSD ;; NetBSD) - __BuildOS=NetBSD + __TargetOS=NetBSD __HostOS=NetBSD ;; SunOS) - __BuildOS=SunOS + __TargetOS=SunOS __HostOS=SunOS ;; *) echo "Unsupported OS $OSName detected, configuring as if for Linux" - __BuildOS=Linux + __TargetOS=Linux __HostOS=Linux ;; esac @@ -145,7 +145,7 @@ esac isPortable=0 source "${scriptDir}"/../../../eng/native/init-distro-rid.sh -initDistroRidGlobal "$__BuildOS" x64 "$isPortable" +initDistroRidGlobal "$__TargetOS" x64 "$isPortable" # Hack, replace the rid to ubuntu.14.04 which has a valid non-portable # package. @@ -153,7 +153,7 @@ initDistroRidGlobal "$__BuildOS" x64 "$isPortable" # The CoreDisTools package is currently manually packaged and we only have # 14.04 and 16.04 packages. Use the oldest package which will work on newer # platforms. -if [ "$__BuildOS" = "Linux" ]; then +if [ "$__TargetOS" = "Linux" ]; then if [ "$__BuildArch" = "x64" ]; then __DistroRid=ubuntu.14.04-x64 elif [ "$__BuildArch" = "x86" ]; then @@ -178,7 +178,7 @@ then exit_with_error 1 "Failed to restore the package" fi -CoreDisToolsPackagePathOutputFile="${scriptDir}/../../../artifacts/obj/coreclr/${__BuildOS}.x64/optdatapath.txt" +CoreDisToolsPackagePathOutputFile="${scriptDir}/../../../artifacts/obj/coreclr/${__TargetOS}.x64/optdatapath.txt" bash -c -x "$dotnet msbuild $csprojPath /t:DumpCoreDisToolsPackagePath /p:CoreDisToolsPackagePathOutputFile=\"$CoreDisToolsPackagePathOutputFile\" /p:RuntimeIdentifier=\"$rid\"" if [ $? -ne 0 ] diff --git a/src/coreclr/tests/src/Common/test_dependencies/test_dependencies.csproj b/src/coreclr/tests/src/Common/test_dependencies/test_dependencies.csproj index ac597b9214b..4124f743d21 100644 --- a/src/coreclr/tests/src/Common/test_dependencies/test_dependencies.csproj +++ b/src/coreclr/tests/src/Common/test_dependencies/test_dependencies.csproj @@ -21,7 +21,7 @@ <Import Project="$(RepositoryEngineeringDir)liveBuilds.targets" /> - <Target Name="AddUcrtFilesToCoreRoot" BeforeTargets="CopyDependencyToCoreRoot" Condition="'$(BuildOS)' == 'Windows_NT'"> + <Target Name="AddUcrtFilesToCoreRoot" BeforeTargets="CopyDependencyToCoreRoot" Condition="'$(TargetOS)' == 'Windows_NT'"> <ItemGroup> <NativeCopyLocalItems Include="$(UniversalCRTSDKDir)Redist\ucrt\DLLs\$(BuildArch)\*.dll" /> </ItemGroup> diff --git a/src/coreclr/tests/src/Directory.Build.props b/src/coreclr/tests/src/Directory.Build.props index 00d5ce2a780..2d3ee4bf90c 100644 --- a/src/coreclr/tests/src/Directory.Build.props +++ b/src/coreclr/tests/src/Directory.Build.props @@ -30,7 +30,7 @@ <BinDir>$(BaseOutputPathWithConfig)</BinDir> <BaseIntermediateOutputPath>$(RootRepoDir)\artifacts\tests\coreclr\obj\$(OSPlatformConfig)\Managed\</BaseIntermediateOutputPath> <BaseIntermediateOutputPath Condition="'$(__ManagedTestIntermediatesDir)' != ''">$(__ManagedTestIntermediatesDir)\</BaseIntermediateOutputPath> - <__NativeTestIntermediatesDir Condition="'$(__NativeTestIntermediatesDir)' == ''">$([System.IO.Path]::GetFullPath($(BaseOutputPathWithConfig)..\..\coreclr\obj\$(BuildOS).$(BuildArch).$(Configuration)\Native\))</__NativeTestIntermediatesDir> + <__NativeTestIntermediatesDir Condition="'$(__NativeTestIntermediatesDir)' == ''">$([System.IO.Path]::GetFullPath($(BaseOutputPathWithConfig)..\..\coreclr\obj\$(TargetOS).$(BuildArch).$(Configuration)\Native\))</__NativeTestIntermediatesDir> <BuildProjectRelativeDir>$(MSBuildProjectName)\</BuildProjectRelativeDir> <BuildProjectRelativeDir Condition="'$(MSBuildProjectDirectory.Contains($(TestSourceDir)))'">$([System.String]::Copy('$(MSBuildProjectDirectory)').Replace($(TestSourceDir),''))\$(MSBuildProjectName)</BuildProjectRelativeDir> <IntermediateOutputPath>$(BaseIntermediateOutputPath)$(BuildProjectRelativeDir)\</IntermediateOutputPath> @@ -55,22 +55,13 @@ <UseAppHost>false</UseAppHost> </PropertyGroup> - <!-- Expose the target OS in a more convenient fashion --> - <PropertyGroup> - <OSGroup Condition="'$(OSGroup)'=='' and $(OSPlatformConfig.StartsWith('Windows'))">Windows_NT</OSGroup> - <OSGroup Condition="'$(OSGroup)'=='' and $(OSPlatformConfig.StartsWith('Linux'))">Linux</OSGroup> - <OSGroup Condition="'$(OSGroup)'=='' and $(OSPlatformConfig.StartsWith('OSX'))">OSX</OSGroup> - <OSGroup Condition="'$(OSGroup)'=='' and $(OSPlatformConfig.StartsWith('FreeBSD'))">FreeBSD</OSGroup> - <OSGroup Condition="'$(OSGroup)'==''">AnyOS</OSGroup> - </PropertyGroup> - - <!-- Setup properties per OSGroup --> + <!-- Setup properties per TargetOS --> <Choose> - <When Condition="'$(OSGroup)'=='AnyOS'"> + <When Condition="'$(TargetOS)'=='AnyOS'"> <PropertyGroup> </PropertyGroup> </When> - <When Condition="'$(OSGroup)'=='Windows_NT'"> + <When Condition="'$(TargetOS)'=='Windows_NT'"> <PropertyGroup> <!-- Since cross compilation of test builds on Windows is possible, the TargetsWindows property may already be set. Only set the property if @@ -79,32 +70,27 @@ <TestNugetRuntimeId>win-$(__BuildArch)</TestNugetRuntimeId> </PropertyGroup> </When> - <When Condition="'$(OSGroup)'=='Linux'"> + <When Condition="'$(TargetOS)'=='Linux'"> <PropertyGroup> <TargetsUnix>true</TargetsUnix> <TargetsLinux>true</TargetsLinux> <TestNugetRuntimeId>ubuntu.14.04-$(__BuildArch)</TestNugetRuntimeId> </PropertyGroup> </When> - <When Condition="'$(OSGroup)'=='OSX'"> + <When Condition="'$(TargetOS)'=='OSX'"> <PropertyGroup> <TargetsUnix>true</TargetsUnix> <TargetsOSX>true</TargetsOSX> <TestNugetRuntimeId>osx.10.12-$(__BuildArch)</TestNugetRuntimeId> </PropertyGroup> </When> - <When Condition="'$(OSGroup)'=='FreeBSD'"> + <When Condition="'$(TargetOS)'=='FreeBSD'"> <PropertyGroup> <TargetsUnix>true</TargetsUnix> <TargetsFreeBSD>true</TargetsFreeBSD> <TestNugetRuntimeId>ubuntu.14.04-$(__BuildArch)</TestNugetRuntimeId> </PropertyGroup> </When> - <Otherwise> - <PropertyGroup> - <ConfigurationErrorMsg>$(ConfigurationErrorMsg);Unknown OSGroup [$(OSGroup)] specificed in your project.</ConfigurationErrorMsg> - </PropertyGroup> - </Otherwise> </Choose> <PropertyGroup> @@ -123,7 +109,7 @@ </PropertyGroup> <PropertyGroup> - <TargetsUnknownUnix Condition="'$(TargetsUnix)' == 'true' AND '$(OSGroup)' != 'FreeBSD' AND '$(OSGroup)' != 'Linux' AND '$(OSGroup)' != 'OSX'">true</TargetsUnknownUnix> + <TargetsUnknownUnix Condition="'$(TargetsUnix)' == 'true' AND '$(TargetOS)' != 'FreeBSD' AND '$(TargetOS)' != 'Linux' AND '$(TargetOS)' != 'OSX'">true</TargetsUnknownUnix> <Language Condition="'$(Language)' == '' and '$(MSBuildProjectExtension)' == '.csproj'">C#</Language> <Language Condition="'$(Language)' == '' and '$(MSBuildProjectExtension)' == '.ilproj'">IL</Language> </PropertyGroup> diff --git a/src/coreclr/tests/src/Directory.Build.targets b/src/coreclr/tests/src/Directory.Build.targets index 49e5369de3f..c113fe20023 100644 --- a/src/coreclr/tests/src/Directory.Build.targets +++ b/src/coreclr/tests/src/Directory.Build.targets @@ -139,10 +139,10 @@ <NativeProjectBinariesExeFilterRemovedCMakeFile Condition="'$(RunningOnUnix)' == 'true' and !$([System.Text.RegularExpressions.Regex]::IsMatch(['%(Identity)', `.*CMakeFiles.*`))" Include="@(NativeProjectBinariesExeFilterRemovedMakeFile)" /> <!-- Filter .dylib files on OSX --> - <NativeProjectBinariesDyLibFilter Condition="'$(__BuildOS)' == 'OSX' and $([System.Text.RegularExpressions.Regex]::IsMatch(['%(Identity)', `(.*\/).*\.dylib`))" Include="@(NativeProjectBinariesMatched)" /> + <NativeProjectBinariesDyLibFilter Condition="'$(__TargetOS)' == 'OSX' and $([System.Text.RegularExpressions.Regex]::IsMatch(['%(Identity)', `(.*\/).*\.dylib`))" Include="@(NativeProjectBinariesMatched)" /> <!-- Filter .so files on Linux --> - <NativeProjectBinariesDyLibFilter Condition="'$(__BuildOS)' == 'Linux' and $([System.Text.RegularExpressions.Regex]::IsMatch(['%(Identity)', `(.*\/).*\.so`))" Include="@(NativeProjectBinariesMatched)" /> + <NativeProjectBinariesDyLibFilter Condition="'$(__TargetOS)' == 'Linux' and $([System.Text.RegularExpressions.Regex]::IsMatch(['%(Identity)', `(.*\/).*\.so`))" Include="@(NativeProjectBinariesMatched)" /> <!-- Filter static lib files on Unix --> <NativeProjectBinariesStaticLibFilter Condition="'$(RunningOnUnix)' == 'true' and $([System.Text.RegularExpressions.Regex]::IsMatch(['%(Identity)', `(.*\/).*\.a`))" Include="@(NativeProjectBinariesMatched)" /> diff --git a/src/coreclr/tests/src/Interop/NativeLibraryResolveCallback/CallbackStressTest.csproj b/src/coreclr/tests/src/Interop/NativeLibraryResolveCallback/CallbackStressTest.csproj index e7e11ee01e7..e7ba58f1d65 100644 --- a/src/coreclr/tests/src/Interop/NativeLibraryResolveCallback/CallbackStressTest.csproj +++ b/src/coreclr/tests/src/Interop/NativeLibraryResolveCallback/CallbackStressTest.csproj @@ -3,7 +3,7 @@ <OutputType>Exe</OutputType> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> <ReferenceSystemPrivateCoreLib>true</ReferenceSystemPrivateCoreLib> - <DefineConstants Condition="$(OSGroup) == 'Windows_NT'">WINDOWS</DefineConstants> + <DefineConstants Condition="$(TargetOS) == 'Windows_NT'">WINDOWS</DefineConstants> </PropertyGroup> <ItemGroup> <Compile Include="CallbackStressTest.cs" /> diff --git a/src/coreclr/tests/src/JIT/Directed/StructABI/StructABI.csproj b/src/coreclr/tests/src/JIT/Directed/StructABI/StructABI.csproj index 911901bba3b..cf56275343e 100644 --- a/src/coreclr/tests/src/JIT/Directed/StructABI/StructABI.csproj +++ b/src/coreclr/tests/src/JIT/Directed/StructABI/StructABI.csproj @@ -9,9 +9,9 @@ </PropertyGroup> <ItemGroup> <Compile Include="StructABI.cs" /> - <Compile Include="StructABI.Windows.cs" Condition="'$(OSGroup)' == 'Windows_NT'" /> - <Compile Include="StructABI.Unix.cs" Condition="'$(OSGroup)' == 'Linux' Or '$(OSGroup)' == 'FreeBSD'" /> - <Compile Include="StructABI.OSX.cs" Condition="'$(OSGroup)' == 'OSX'" /> + <Compile Include="StructABI.Windows.cs" Condition="'$(TargetOS)' == 'Windows_NT'" /> + <Compile Include="StructABI.Unix.cs" Condition="'$(TargetOS)' == 'Linux' Or '$(TargetOS)' == 'FreeBSD'" /> + <Compile Include="StructABI.OSX.cs" Condition="'$(TargetOS)' == 'OSX'" /> </ItemGroup> <ItemGroup> <ProjectReference Include="CMakeLists.txt" /> diff --git a/src/coreclr/tests/src/JIT/Directed/arglist/vararg.csproj b/src/coreclr/tests/src/JIT/Directed/arglist/vararg.csproj index 7cbbd08c1d3..c6dbd68272d 100644 --- a/src/coreclr/tests/src/JIT/Directed/arglist/vararg.csproj +++ b/src/coreclr/tests/src/JIT/Directed/arglist/vararg.csproj @@ -4,7 +4,7 @@ <AllowUnsafeBlocks>true</AllowUnsafeBlocks> </PropertyGroup> <PropertyGroup> - <DefineConstants Condition=" '$(OSGroup)' == 'Windows_NT' ">$(DefineConstants);WIN32</DefineConstants> + <DefineConstants Condition=" '$(TargetOS)' == 'Windows_NT' ">$(DefineConstants);WIN32</DefineConstants> </PropertyGroup> <PropertyGroup> <DebugType>PdbOnly</DebugType> diff --git a/src/coreclr/tests/src/Loader/classloader/generics/Instantiation/Nesting/NestedGenericClasses.csproj b/src/coreclr/tests/src/Loader/classloader/generics/Instantiation/Nesting/NestedGenericClasses.csproj index 7fc02936a48..ee656d5276d 100644 --- a/src/coreclr/tests/src/Loader/classloader/generics/Instantiation/Nesting/NestedGenericClasses.csproj +++ b/src/coreclr/tests/src/Loader/classloader/generics/Instantiation/Nesting/NestedGenericClasses.csproj @@ -5,7 +5,7 @@ <CLRTestKind>BuildAndRun</CLRTestKind> <CLRTestPriority>1</CLRTestPriority> <!-- Test fails to build on .NET Core 3.0 preview3 --> - <DisableProjectBuild Condition="'$(__BuildOS)' == 'OSX'">true</DisableProjectBuild> + <DisableProjectBuild Condition="'$(__TargetOS)' == 'OSX'">true</DisableProjectBuild> </PropertyGroup> <ItemGroup> <Compile Include="NestedGenericClasses.cs" /> diff --git a/src/coreclr/tests/src/Loader/classloader/generics/Instantiation/Nesting/NestedGenericStructs.csproj b/src/coreclr/tests/src/Loader/classloader/generics/Instantiation/Nesting/NestedGenericStructs.csproj index 38aa1fdf1ee..c654455c802 100644 --- a/src/coreclr/tests/src/Loader/classloader/generics/Instantiation/Nesting/NestedGenericStructs.csproj +++ b/src/coreclr/tests/src/Loader/classloader/generics/Instantiation/Nesting/NestedGenericStructs.csproj @@ -5,7 +5,7 @@ <CLRTestKind>BuildAndRun</CLRTestKind> <CLRTestPriority>1</CLRTestPriority> <!-- Test fails to build on .NET Core 3.0 preview3 --> - <DisableProjectBuild Condition="'$(__BuildOS)' == 'OSX'">true</DisableProjectBuild> + <DisableProjectBuild Condition="'$(__TargetOS)' == 'OSX'">true</DisableProjectBuild> </PropertyGroup> <ItemGroup> <Compile Include="NestedGenericStructs.cs" /> diff --git a/src/coreclr/tests/src/Loader/classloader/generics/Instantiation/Nesting/NestedGenericTypesMix.csproj b/src/coreclr/tests/src/Loader/classloader/generics/Instantiation/Nesting/NestedGenericTypesMix.csproj index ea5854a7cb2..1cdc7988962 100644 --- a/src/coreclr/tests/src/Loader/classloader/generics/Instantiation/Nesting/NestedGenericTypesMix.csproj +++ b/src/coreclr/tests/src/Loader/classloader/generics/Instantiation/Nesting/NestedGenericTypesMix.csproj @@ -5,7 +5,7 @@ <CLRTestKind>BuildAndRun</CLRTestKind> <CLRTestPriority>1</CLRTestPriority> <!-- Test fails to build on .NET Core 3.0 preview3 --> - <DisableProjectBuild Condition="'$(__BuildOS)' == 'OSX'">true</DisableProjectBuild> + <DisableProjectBuild Condition="'$(__TargetOS)' == 'OSX'">true</DisableProjectBuild> </PropertyGroup> <ItemGroup> <Compile Include="NestedGenericTypesMix.cs" /> diff --git a/src/coreclr/tests/src/baseservices/exceptions/WindowsEventLog/WindowsEventLog.csproj b/src/coreclr/tests/src/baseservices/exceptions/WindowsEventLog/WindowsEventLog.csproj index 54a10c966a4..aa33e315d24 100644 --- a/src/coreclr/tests/src/baseservices/exceptions/WindowsEventLog/WindowsEventLog.csproj +++ b/src/coreclr/tests/src/baseservices/exceptions/WindowsEventLog/WindowsEventLog.csproj @@ -1,7 +1,7 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> - <DefineConstants Condition="$(OSGroup) == 'Windows_NT'">WINDOWS</DefineConstants> + <DefineConstants Condition="$(TargetOS) == 'Windows_NT'">WINDOWS</DefineConstants> <UnloadabilityIncompatible>true</UnloadabilityIncompatible> </PropertyGroup> <PropertyGroup> diff --git a/src/coreclr/tests/src/dirs.proj b/src/coreclr/tests/src/dirs.proj index 90ba9794745..107e1f4cf29 100644 --- a/src/coreclr/tests/src/dirs.proj +++ b/src/coreclr/tests/src/dirs.proj @@ -114,7 +114,7 @@ <ItemGroup> <Project Include="@(AllProjects->WithMetadataValue('InGroup', 'True'))"> - <AdditionalProperties>OSGroup=$(OSGroup)</AdditionalProperties> + <AdditionalProperties>TargetOS=$(TargetOS)</AdditionalProperties> </Project> </ItemGroup> diff --git a/src/coreclr/tests/src/readytorun/r2rdump/R2RDumpTest.csproj b/src/coreclr/tests/src/readytorun/r2rdump/R2RDumpTest.csproj index ca9f7b28c81..3045a24bc75 100644 --- a/src/coreclr/tests/src/readytorun/r2rdump/R2RDumpTest.csproj +++ b/src/coreclr/tests/src/readytorun/r2rdump/R2RDumpTest.csproj @@ -3,12 +3,12 @@ <OutputType>Exe</OutputType> <CLSCompliant>false</CLSCompliant> <CoreClrDir>..\..\..\..\..\..\</CoreClrDir> - <R2RDumpCommand>$(CoreClrDir)artifacts\bin\coreclr\$(BuildOS).$(BuildArch).$(BuildType)\netcoreapp2.0\R2RDump.dll</R2RDumpCommand> + <R2RDumpCommand>$(CoreClrDir)artifacts\bin\coreclr\$(TargetOS).$(BuildArch).$(BuildType)\netcoreapp2.0\R2RDump.dll</R2RDumpCommand> <DotnetToolCommand>$(CoreClrDir).dotnet\dotnet</DotnetToolCommand> <BashCoreClrDir>../../../../../../</BashCoreClrDir> - <BashR2RDumpCommand>$(BashCoreClrDir)artifacts/bin/coreclr/$(BuildOS).$(BuildArch).$(BuildType)/netcoreapp2.0/R2RDump.dll</BashR2RDumpCommand> + <BashR2RDumpCommand>$(BashCoreClrDir)artifacts/bin/coreclr/$(TargetOS).$(BuildArch).$(BuildType)/netcoreapp2.0/R2RDump.dll</BashR2RDumpCommand> <BashDotnetToolCommand>$(CoreClrDir).dotnet/dotnet</BashDotnetToolCommand> - <CLRTestExecutionArguments>$(CoreClrDir)tests\src\readytorun\r2rdump\files\$(BuildOS).$(BuildArch).$(BuildType)\</CLRTestExecutionArguments> + <CLRTestExecutionArguments>$(CoreClrDir)tests\src\readytorun\r2rdump\files\$(TargetOS).$(BuildArch).$(BuildType)\</CLRTestExecutionArguments> <!-- Test unsupported outside of windows --> <!-- Test unsupported on arm targets --> <TestUnsupportedOutsideWindows>true</TestUnsupportedOutsideWindows> diff --git a/src/coreclr/tests/src/readytorun/r2rdump/rebaseline.cmd b/src/coreclr/tests/src/readytorun/r2rdump/rebaseline.cmd index 09a15ab01bb..93c132ed5ff 100644 --- a/src/coreclr/tests/src/readytorun/r2rdump/rebaseline.cmd +++ b/src/coreclr/tests/src/readytorun/r2rdump/rebaseline.cmd @@ -2,33 +2,33 @@ set CurrentDir=%~dp0 set ProjectDir=%CurrentDir%..\..\..\..\ set RepoRoot=%ProjectDir%..\..\ -"%RepoRoot%dotnet.cmd" build /p:__BuildArch=x64 /p:__BuildOS=Windows_NT /p:__BuildType=Checked %ProjectDir%src\tools\r2rdump\R2RDump.csproj -"%RepoRoot%dotnet.cmd" build /p:__BuildArch=x64 /p:__BuildOS=Windows_NT /p:__BuildType=Debug %ProjectDir%src\tools\r2rdump\R2RDump.csproj -"%RepoRoot%dotnet.cmd" build /p:__BuildArch=x86 /p:__BuildOS=Windows_NT /p:__BuildType=Release %ProjectDir%src\tools\r2rdump\R2RDump.csproj -"%RepoRoot%dotnet.cmd" build /p:__BuildArch=x86 /p:__BuildOS=Windows_NT /p:__BuildType=Debug %ProjectDir%src\tools\r2rdump\R2RDump.csproj +"%RepoRoot%dotnet.cmd" build /p:__BuildArch=x64 /p:__TargetOS=Windows_NT /p:__BuildType=Checked %ProjectDir%src\tools\r2rdump\R2RDump.csproj +"%RepoRoot%dotnet.cmd" build /p:__BuildArch=x64 /p:__TargetOS=Windows_NT /p:__BuildType=Debug %ProjectDir%src\tools\r2rdump\R2RDump.csproj +"%RepoRoot%dotnet.cmd" build /p:__BuildArch=x86 /p:__TargetOS=Windows_NT /p:__BuildType=Release %ProjectDir%src\tools\r2rdump\R2RDump.csproj +"%RepoRoot%dotnet.cmd" build /p:__BuildArch=x86 /p:__TargetOS=Windows_NT /p:__BuildType=Debug %ProjectDir%src\tools\r2rdump\R2RDump.csproj set tests=HelloWorld GcInfoTransitions GenericFunctions MultipleRuntimeFunctions (for %%a in (%tests%) do ( - "%RepoRoot%dotnet.cmd" build /p:__BuildArch=x64 /p:__BuildOS=Windows_NT /p:__BuildType=Checked "%ProjectDir%tests\src\readytorun\r2rdump\files\%%a.csproj" + "%RepoRoot%dotnet.cmd" build /p:__BuildArch=x64 /p:__TargetOS=Windows_NT /p:__BuildType=Checked "%ProjectDir%tests\src\readytorun\r2rdump\files\%%a.csproj" %ProjectDir%artifacts\tests\Windows_NT.x64.Checked\Tests\Core_Root\crossgen /readytorun /platform_assemblies_paths %ProjectDir%artifacts\tests\Windows_NT.x64.Checked\Tests\Core_Root /out %%a.ni.dll %ProjectDir%artifacts\tests\Windows_NT.x64.Checked\readytorun\r2rdump\files\%%a\%%a.dll "%RepoRoot%dotnet.cmd" %ProjectDir%artifacts\bin\coreclr\Windows_NT.x64.Checked\netcoreapp2.0\R2RDump.dll --in %%a.ni.dll --out %ProjectDir%tests\src\readytorun\r2rdump\files\Windows_NT.x64.Checked\%%a.xml -x -v --ignoreSensitive )) (for %%a in (%tests%) do ( - "%RepoRoot%dotnet.cmd" build /p:__BuildArch=x64 /p:__BuildOS=Windows_NT /p:__BuildType=Debug "%ProjectDir%tests\src\readytorun\r2rdump\files\%%a.csproj" + "%RepoRoot%dotnet.cmd" build /p:__BuildArch=x64 /p:__TargetOS=Windows_NT /p:__BuildType=Debug "%ProjectDir%tests\src\readytorun\r2rdump\files\%%a.csproj" %ProjectDir%artifacts\tests\Windows_NT.x64.Debug\Tests\Core_Root\crossgen /readytorun /platform_assemblies_paths %ProjectDir%artifacts\tests\Windows_NT.x64.Debug\Tests\Core_Root /out %%a.ni.dll %ProjectDir%artifacts\tests\Windows_NT.x64.Debug\readytorun\r2rdump\files\%%a\%%a.dll "%RepoRoot%dotnet.cmd" %ProjectDir%artifacts\bin\coreclr\Windows_NT.x64.Debug\netcoreapp2.0\R2RDump.dll --in %%a.ni.dll --out %ProjectDir%tests\src\readytorun\r2rdump\files\Windows_NT.x64.Debug\%%a.xml -x -v --ignoreSensitive )) (for %%a in (%tests%) do ( - "%RepoRoot%dotnet.cmd" build /p:__BuildArch=x86 /p:__BuildOS=Windows_NT /p:__BuildType=Release "%ProjectDir%tests\src\readytorun\r2rdump\files\%%a.csproj" + "%RepoRoot%dotnet.cmd" build /p:__BuildArch=x86 /p:__TargetOS=Windows_NT /p:__BuildType=Release "%ProjectDir%tests\src\readytorun\r2rdump\files\%%a.csproj" %ProjectDir%artifacts\tests\Windows_NT.x86.Release\Tests\Core_Root\crossgen /readytorun /platform_assemblies_paths %ProjectDir%artifacts\tests\Windows_NT.x86.Release\Tests\Core_Root /out %%a.ni.dll %ProjectDir%artifacts\tests\Windows_NT.x86.Release\readytorun\r2rdump\files\%%a\%%a.dll "%RepoRoot%dotnet.cmd" %ProjectDir%artifacts\bin\coreclr\Windows_NT.x86.Release\netcoreapp2.0\R2RDump.dll --in %%a.ni.dll --out %ProjectDir%tests\src\readytorun\r2rdump\files\Windows_NT.x86.Release\%%a.xml -x -v --ignoreSensitive )) (for %%a in (%tests%) do ( - "%RepoRoot%dotnet.cmd" build /p:__BuildArch=x86 /p:__BuildOS=Windows_NT /p:__BuildType=Debug "%ProjectDir%tests\src\readytorun\r2rdump\files\%%a.csproj" + "%RepoRoot%dotnet.cmd" build /p:__BuildArch=x86 /p:__TargetOS=Windows_NT /p:__BuildType=Debug "%ProjectDir%tests\src\readytorun\r2rdump\files\%%a.csproj" %ProjectDir%artifacts\tests\Windows_NT.x86.Debug\Tests\Core_Root\crossgen /readytorun /platform_assemblies_paths %ProjectDir%artifacts\tests\Windows_NT.x86.Debug\Tests\Core_Root /out %%a.ni.dll %ProjectDir%artifacts\tests\Windows_NT.x86.Debug\readytorun\r2rdump\files\%%a\%%a.dll "%RepoRoot%dotnet.cmd" %ProjectDir%artifacts\bin\coreclr\Windows_NT.x86.Debug\netcoreapp2.0\R2RDump.dll --in %%a.ni.dll --out %ProjectDir%tests\src\readytorun\r2rdump\files\Windows_NT.x86.Debug\%%a.xml -x -v --ignoreSensitive )) diff --git a/src/coreclr/tests/src/runtest.proj b/src/coreclr/tests/src/runtest.proj index f313b4d24cd..fec812140ca 100644 --- a/src/coreclr/tests/src/runtest.proj +++ b/src/coreclr/tests/src/runtest.proj @@ -352,8 +352,8 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\",""). <Target Name="GetListOfTestCmds"> <ItemGroup> - <AllRunnableTestPaths Include="$(XunitTestBinBase)\**\*.cmd" Condition="'$(BuildOS)' == 'Windows_NT'" /> - <AllRunnableTestPaths Include="$(XunitTestBinBase)\**\*.sh" Condition="'$(BuildOS)' != 'Windows_NT'" /> + <AllRunnableTestPaths Include="$(XunitTestBinBase)\**\*.cmd" Condition="'$(TargetOS)' == 'Windows_NT'" /> + <AllRunnableTestPaths Include="$(XunitTestBinBase)\**\*.sh" Condition="'$(TargetOS)' != 'Windows_NT'" /> </ItemGroup> </Target> diff --git a/src/coreclr/tests/testgrouping.proj b/src/coreclr/tests/testgrouping.proj index 1ff04a97d59..635ed042584 100644 --- a/src/coreclr/tests/testgrouping.proj +++ b/src/coreclr/tests/testgrouping.proj @@ -10,7 +10,7 @@ <XUnitWrapperDll>$(BinDir)JIT\jit64\JIT.jit64.XUnitWrapper.dll</XUnitWrapperDll> </TestGrouping> - <TestGrouping Condition="'$(BuildOS)' == 'Windows_NT'" Include="$(BinDir)JIT\jit64\mcc\**"> + <TestGrouping Condition="'$(TargetOS)' == 'Windows_NT'" Include="$(BinDir)JIT\jit64\mcc\**"> <TestGroup>JIT.jit64.mcc</TestGroup> <XUnitWrapperDll>$(BinDir)JIT\jit64\JIT.jit64.XUnitWrapper.dll</XUnitWrapperDll> </TestGrouping> diff --git a/src/installer/Directory.Build.props b/src/installer/Directory.Build.props index 8e9b4179429..6ded9b98c9d 100644 --- a/src/installer/Directory.Build.props +++ b/src/installer/Directory.Build.props @@ -51,19 +51,9 @@ <TargetArchitecture Condition="'$(TargetArchitecture)' == '' AND '$(BuildArchitecture)' == 'arm64'">$(BuildArchitecture)</TargetArchitecture> <TargetArchitecture Condition="'$(TargetArchitecture)' == ''">x64</TargetArchitecture> <Platform Condition="'$(Platform)'==''">$(TargetArchitecture)</Platform> + <TargetOS Condition="'$(TargetOS)' == 'Linux'">Unix</TargetOS> </PropertyGroup> - <!-- - Projects that have no OS-specific implementations just use Debug and Release for $(Configuration). - Projects that do have OS-specific implementations use OS_Debug and OS_Release, for all OS's we support even - if the code is the same between some OS's (so if you have some project that just calls POSIX APIs, we still have - OSX_[Debug|Release] and Linux_[Debug|Release] configurations. We do this so that we place all the output under - a single binary folder and can have a similar experience between the command line and Visual Studio. - --> - <PropertyGroup> - <OSGroup Condition="'$(OS)'=='Unix' AND Exists('/Applications')">OSX</OSGroup> - <OSGroup Condition="'$(OSGroup)' == ''">$(OS)</OSGroup> - </PropertyGroup> <PropertyGroup> <DebugType Condition="'$(DebugType)' == ''">Portable</DebugType> @@ -76,30 +66,20 @@ </PropertyGroup> <!-- Set up Default symbol and optimization for Configuration --> - <Choose> - <When Condition="'$(Configuration)'=='Debug'"> - <PropertyGroup> - <DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols> - <Optimize Condition="'$(Optimize)' == ''">false</Optimize> - <DefineConstants>$(DefineConstants),DEBUG,TRACE</DefineConstants> - </PropertyGroup> - </When> - <When Condition="'$(Configuration)' == 'Release'"> - <PropertyGroup> - <DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols> - <Optimize Condition="'$(Optimize)' == ''">true</Optimize> - <DefineConstants>$(DefineConstants),TRACE</DefineConstants> - </PropertyGroup> - </When> - <Otherwise> - <PropertyGroup> - <ConfigurationErrorMsg>$(ConfigurationErrorMsg);Unknown Configuration [$(Configuration)] specificed in your project.</ConfigurationErrorMsg> - </PropertyGroup> - </Otherwise> - </Choose> + <PropertyGroup Condition="'$(Configuration)'=='Debug'"> + <DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols> + <Optimize Condition="'$(Optimize)' == ''">false</Optimize> + <DefineConstants>$(DefineConstants),DEBUG,TRACE</DefineConstants> + </PropertyGroup> + + <PropertyGroup Condition="'$(Configuration)' == 'Release'"> + <DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols> + <Optimize Condition="'$(Optimize)' == ''">true</Optimize> + <DefineConstants>$(DefineConstants),TRACE</DefineConstants> + </PropertyGroup> <PropertyGroup> - <ExeSuffix Condition="'$(OSGroup)'=='Windows_NT'">.exe</ExeSuffix> + <ExeSuffix Condition="'$(TargetOS)' == 'Windows_NT'">.exe</ExeSuffix> </PropertyGroup> <Import Project="$(HostMachineInfoProps)" @@ -111,10 +91,10 @@ <!-- Portable --> <PropertyGroup Condition="'$(PortableBuild)' == 'true'"> - <OutputRid Condition="'$(OSGroup)' == 'Windows_NT'">win-$(TargetArchitecture)</OutputRid> - <OutputRid Condition="'$(OSGroup)' == 'OSX'">osx-$(TargetArchitecture)</OutputRid> - <OutputRid Condition="'$(OSGroup)' == 'Linux' or '$(OSGroup)' == 'Unix'">linux-$(TargetArchitecture)</OutputRid> - <OutputRid Condition="'$(OSGroup)' == 'FreeBSD' or $([MSBuild]::IsOSPlatform('FREEBSD'))">freebsd-$(TargetArchitecture)</OutputRid> + <OutputRid Condition="'$(TargetOS)' == 'Windows_NT'">win-$(TargetArchitecture)</OutputRid> + <OutputRid Condition="'$(TargetOS)' == 'OSX'">osx-$(TargetArchitecture)</OutputRid> + <OutputRid Condition="'$(TargetOS)' == 'Linux' or '$(TargetOS)' == 'Unix'">linux-$(TargetArchitecture)</OutputRid> + <OutputRid Condition="'$(TargetOS)' == 'FreeBSD' or $([MSBuild]::IsOSPlatform('FREEBSD'))">freebsd-$(TargetArchitecture)</OutputRid> </PropertyGroup> <PropertyGroup> @@ -149,7 +129,7 @@ <PropertyGroup> <DisableCrossgen>false</DisableCrossgen> <!-- Disable cross-gen on FreeBSD for now. This can be revisited when we have full support. --> - <DisableCrossgen Condition="'$(OSGroup)'=='FreeBSD'">true</DisableCrossgen> + <DisableCrossgen Condition="'$(TargetOS)'=='FreeBSD'">true</DisableCrossgen> <OutputVersionBadge>$(AssetOutputPath)sharedfx_$(OutputRid)_$(Configuration)_version_badge.svg</OutputVersionBadge> </PropertyGroup> @@ -167,10 +147,10 @@ <!-- OSX specific intermediate package suffix . OSX specific intermediate packages are suffixed with -internal to avoid name collision for bundle package (dotnet-runtime-*) and runtime ( earlier as dotnet-sharedframework-*) --> - <InstallerStartSuffix Condition="'$(OSGroup)' == 'OSX'">internal</InstallerStartSuffix> - <SharedHostInstallerStart Condition="'$(OSGroup)' == 'OSX'">$(SharedHostInstallerStart)$(InstallerStartSuffix)-</SharedHostInstallerStart> - <HostFxrInstallerStart Condition="'$(OSGroup)' == 'OSX'">$(HostFxrInstallerStart)$(InstallerStartSuffix)-</HostFxrInstallerStart> - <SharedFrameworkInstallerStart Condition="'$(OSGroup)' == 'OSX'">$(SharedFrameworkInstallerStart)$(InstallerStartSuffix)-</SharedFrameworkInstallerStart> + <InstallerStartSuffix Condition="'$(TargetOS)' == 'OSX'">internal</InstallerStartSuffix> + <SharedHostInstallerStart Condition="'$(TargetOS)' == 'OSX'">$(SharedHostInstallerStart)$(InstallerStartSuffix)-</SharedHostInstallerStart> + <HostFxrInstallerStart Condition="'$(TargetOS)' == 'OSX'">$(HostFxrInstallerStart)$(InstallerStartSuffix)-</HostFxrInstallerStart> + <SharedFrameworkInstallerStart Condition="'$(TargetOS)' == 'OSX'">$(SharedFrameworkInstallerStart)$(InstallerStartSuffix)-</SharedFrameworkInstallerStart> </PropertyGroup> @@ -293,14 +273,14 @@ </Choose> <PropertyGroup> - <CompressedFileExtension Condition="'$(OSGroup)' == 'Windows_NT'">.zip</CompressedFileExtension> - <CompressedFileExtension Condition="'$(OSGroup)' != 'Windows_NT'">.tar.gz</CompressedFileExtension> - <InstallerExtension Condition="'$(OSGroup)' == 'Windows_NT'">.msi</InstallerExtension> - <InstallerExtension Condition="'$(OSGroup)' == 'OSX'">.pkg</InstallerExtension> + <CompressedFileExtension Condition="'$(TargetOS)' == 'Windows_NT'">.zip</CompressedFileExtension> + <CompressedFileExtension Condition="'$(TargetOS)' != 'Windows_NT'">.tar.gz</CompressedFileExtension> + <InstallerExtension Condition="'$(TargetOS)' == 'Windows_NT'">.msi</InstallerExtension> + <InstallerExtension Condition="'$(TargetOS)' == 'OSX'">.pkg</InstallerExtension> <InstallerExtension Condition="'$(TargetsDebian)' == 'true' or '$(TargetsUbuntu)' == 'true' or '$(TargetsLinuxMint)' == 'true' or '$(HostMachineRidTargetsDebianPackages)' == 'true'">.deb</InstallerExtension> <InstallerExtension Condition="'$(TargetsRhel)' == 'true' or '$(TargetsCentos)' == 'true' or '$(TargetsOpensuse)' == 'true' or '$(TargetsFedora)' == 'true' or '$(TargetsOracle)' == 'true' or '$(TargetsSles)' == 'true' or '$(HostMachineRidTargetsRpmPackages)' == 'true'">.rpm</InstallerExtension> - <CombinedInstallerExtension Condition="'$(OSGroup)' == 'Windows_NT'">.exe</CombinedInstallerExtension> - <CombinedInstallerExtension Condition="'$(OSGroup)' != 'Windows_NT'">$(InstallerExtension)</CombinedInstallerExtension> + <CombinedInstallerExtension Condition="'$(TargetOS)' == 'Windows_NT'">.exe</CombinedInstallerExtension> + <CombinedInstallerExtension Condition="'$(TargetOS)' != 'Windows_NT'">$(InstallerExtension)</CombinedInstallerExtension> </PropertyGroup> <!-- Use actual publishable (non-dummy) package name produced by the build system for this RID --> @@ -337,20 +317,20 @@ </PropertyGroup> <PropertyGroup> - <LibPrefix Condition="'$(OSGroup)' != 'Windows_NT'">lib</LibPrefix> + <LibPrefix Condition="'$(TargetOS)' != 'Windows_NT'">lib</LibPrefix> <LibSuffix>.so</LibSuffix> - <LibSuffix Condition="'$(OSGroup)' == 'Windows_NT'">.dll</LibSuffix> - <LibSuffix Condition="'$(OSGroup)' == 'OSX'">.dylib</LibSuffix> + <LibSuffix Condition="'$(TargetOS)' == 'Windows_NT'">.dll</LibSuffix> + <LibSuffix Condition="'$(TargetOS)' == 'OSX'">.dylib</LibSuffix> <StaticLibPrefix>lib</StaticLibPrefix> <StaticLibSuffix>.a</StaticLibSuffix> - <StaticLibSuffix Condition="'$(OSGroup)' == 'Windows_NT'">.lib</StaticLibSuffix> + <StaticLibSuffix Condition="'$(TargetOS)' == 'Windows_NT'">.lib</StaticLibSuffix> </PropertyGroup> <PropertyGroup> <CrossGenSymbolExtension>.map</CrossGenSymbolExtension> - <CrossGenSymbolExtension Condition="'$(OSGroup)' == 'Windows_NT'">.ni.pdb</CrossGenSymbolExtension> + <CrossGenSymbolExtension Condition="'$(TargetOS)' == 'Windows_NT'">.ni.pdb</CrossGenSymbolExtension> <!-- OSX doesn't have crossgen symbols, yet --> - <CrossGenSymbolExtension Condition="'$(OSGroup)' == 'OSX'"></CrossGenSymbolExtension> + <CrossGenSymbolExtension Condition="'$(TargetOS)' == 'OSX'"></CrossGenSymbolExtension> </PropertyGroup> </Project> diff --git a/src/installer/corehost/build.proj b/src/installer/corehost/build.proj index a580f992695..853e9df8ace 100644 --- a/src/installer/corehost/build.proj +++ b/src/installer/corehost/build.proj @@ -22,7 +22,7 @@ BuildCoreHostWindows" /> <Target Name="BuildCoreHostUnix" - Condition="'$(OSGroup)' != 'Windows_NT'" + Condition="'$(TargetOS)' != 'Windows_NT'" DependsOnTargets="GetLatestCommitHash;GenerateNativeVersionFile"> <PropertyGroup> <CMakeBuildDir>$(IntermediateOutputRootPath)corehost\cmake\</CMakeBuildDir> @@ -44,7 +44,7 @@ </Target> <Target Name="BuildCoreHostWindows" - Condition="'$(OSGroup)' == 'Windows_NT'" + Condition="'$(TargetOS)' == 'Windows_NT'" DependsOnTargets="GetLatestCommitHash"> <!-- Generate Version files --> @@ -100,7 +100,7 @@ </Target> <Target Name="PrependWindowsHeaderIncludeToVersionHeaderFile" - Condition="'$(OSGroup)' == 'Windows_NT'" + Condition="'$(TargetOS)' == 'Windows_NT'" AfterTargets="GenerateNativeVersionFile"> <PropertyGroup> <IncludeStatementLine>#include <Windows.h></IncludeStatementLine> diff --git a/src/installer/corehost/build.sh b/src/installer/corehost/build.sh index 0ec589bfd57..7be41faa3ca 100755 --- a/src/installer/corehost/build.sh +++ b/src/installer/corehost/build.sh @@ -12,7 +12,7 @@ __scriptpath="$(cd "$(dirname "$0")"; pwd -P)" __RepoRootDir="$(cd "$__scriptpath"/../../..; pwd -P)" __BuildArch=x64 -__BuildOS=Linux +__TargetOS=Linux __BuildType=Debug __CMakeArgs="" __Compiler=clang diff --git a/src/installer/pkg/packaging/installers.proj b/src/installer/pkg/packaging/installers.proj index 44950a00dec..ed3d50f9cb5 100644 --- a/src/installer/pkg/packaging/installers.proj +++ b/src/installer/pkg/packaging/installers.proj @@ -28,7 +28,7 @@ <Target Name="SignCombinedInstallers" Condition=" - '$(OSGroup)' == 'Windows_NT' and + '$(TargetOS)' == 'Windows_NT' and '$(SkipSigning)' != 'true'" DependsOnTargets=" EnsureSignedBurnEngineFiles; @@ -50,19 +50,19 @@ Targets="Build" /> </Target> - <Target Name="EnsureSignedR2RBinaries" Condition="'$(OSGroup)' == 'Windows_NT'" > + <Target Name="EnsureSignedR2RBinaries" Condition="'$(TargetOS)' == 'Windows_NT'" > <MSBuild Projects="$(SigningToolsDir)\SignR2RBinaries.proj" Targets="Build" /> </Target> - <Target Name="EnsureSignedMsiFiles" Condition="'$(OSGroup)' == 'Windows_NT'" > + <Target Name="EnsureSignedMsiFiles" Condition="'$(TargetOS)' == 'Windows_NT'" > <MSBuild Projects="$(SigningToolsDir)\SignMsiFiles.proj" Targets="Build" /> </Target> - <Target Name="EnsureSignedBurnEngineFiles" Condition="'$(OSGroup)' == 'Windows_NT'" > + <Target Name="EnsureSignedBurnEngineFiles" Condition="'$(TargetOS)' == 'Windows_NT'" > <MSBuild Projects="$(SigningToolsDir)\SignBurnEngineFiles.proj" Targets="Build" /> </Target> - <Target Name="EnsureSignedBurnBundleFiles" Condition="'$(OSGroup)' == 'Windows_NT'" > + <Target Name="EnsureSignedBurnBundleFiles" Condition="'$(TargetOS)' == 'Windows_NT'" > <MSBuild Projects="$(SigningToolsDir)\SignBurnBundleFiles.proj" Targets="Build" /> </Target> @@ -122,22 +122,22 @@ <NetHostFiles Include="$(_NetHostOutputDir)nethost.h" /> <NetHostFiles Include="$(_NetHostOutputDir)$(LibPrefix)nethost$(LibSuffix)" /> <NetHostFiles Include="$(_NetHostOutputDir)$(StaticLibPrefix)nethost$(StaticLibSuffix)" /> - <NetHostFiles Condition="'$(OSGroup)' == 'Windows_NT'" Include="$(_NetHostOutputDir)nethost.lib" /> + <NetHostFiles Condition="'$(TargetOS)' == 'Windows_NT'" Include="$(_NetHostOutputDir)nethost.lib" /> </ItemGroup> <Copy SourceFiles="@(NetHostFiles)" DestinationFolder="$(NetHostPublishRoot)" /> <!-- Fix file permits --> <!-- Reset everything to user readable/writeable and group and world readable. --> - <Exec Condition="'$(OSGroup)' != 'Windows_NT'" + <Exec Condition="'$(TargetOS)' != 'Windows_NT'" Command='find %(OutDirs.Identity) -type f -name "*" -exec chmod 644 {} \;' /> <!-- Generally, dylibs and sos have 'x' --> - <Exec Condition="'$(OSGroup)' != 'Windows_NT'" + <Exec Condition="'$(TargetOS)' != 'Windows_NT'" Command='find %(OutDirs.Identity) -type f -name "*.dylib" -exec chmod 755 {} \;' /> - <Exec Condition="'$(OSGroup)' != 'Windows_NT'" + <Exec Condition="'$(TargetOS)' != 'Windows_NT'" Command='find %(OutDirs.Identity) -type f -name "*.so" -exec chmod 755 {} \;' /> <!-- Executables (those without dots) are executable --> - <Exec Condition="'$(OSGroup)' != 'Windows_NT'" + <Exec Condition="'$(TargetOS)' != 'Windows_NT'" Command='find %(OutDirs.Identity) -type f ! -name "*.*" -exec chmod 755 {} \;' /> @@ -180,7 +180,7 @@ <UsingTask TaskName="ZipFileCreateFromDirectory" AssemblyFile="$(InstallerTasksAssemblyPath)"/> <Target Name="GenerateZip" - Condition="'$(OSGroup)'=='Windows_NT'"> + Condition="'$(TargetOS)'=='Windows_NT'"> <ZipFileCreateFromDirectory SourceDirectory="$(CombinedPublishRoot)" @@ -209,7 +209,7 @@ </Target> <Target Name="GenerateTarBall" - Condition="'$(OSGroup)'!='Windows_NT'"> + Condition="'$(TargetOS)'!='Windows_NT'"> <!-- tar command will throw 'file changed as we read it' on some distros. ignore that error. we use -C so that we get a relative folder structure which is compressed rather than the full path --> diff --git a/src/installer/pkg/packaging/osx/package.targets b/src/installer/pkg/packaging/osx/package.targets index eece2ac7dea..fd039da10a6 100644 --- a/src/installer/pkg/packaging/osx/package.targets +++ b/src/installer/pkg/packaging/osx/package.targets @@ -5,13 +5,13 @@ <UsingTask TaskName="ReplaceFileContents" AssemblyFile="$(InstallerTasksAssemblyPath)"/> <Target Name="InitPkg" - Condition="'$(OSGroup)' == 'OSX'"> + Condition="'$(TargetOS)' == 'OSX'"> <MakeDir Condition="!Exists('$(PackagesIntermediateDir)')" Directories="$(PackagesIntermediateDir)" /> </Target> <Target Name="GeneratePkgs" - Condition="'$(OSGroup)' == 'OSX'" + Condition="'$(TargetOS)' == 'OSX'" DependsOnTargets="GetInstallerBrandingNames;InitPkg"> <ItemGroup> <OSXPackages Include="sharedframework"> diff --git a/src/installer/pkg/projects/Microsoft.NETCore.DotNetAppHost/Microsoft.NETCore.DotNetAppHost.props b/src/installer/pkg/projects/Microsoft.NETCore.DotNetAppHost/Microsoft.NETCore.DotNetAppHost.props index 0d10ddb6f30..cdf7d9647bd 100644 --- a/src/installer/pkg/projects/Microsoft.NETCore.DotNetAppHost/Microsoft.NETCore.DotNetAppHost.props +++ b/src/installer/pkg/projects/Microsoft.NETCore.DotNetAppHost/Microsoft.NETCore.DotNetAppHost.props @@ -3,6 +3,6 @@ <Import Condition="'$(PackageTargetRuntime)' != ''" - Project="$(MSBuildThisFileDirectory)runtime.$(OSGroup).$(MSBuildThisFile)" /> + Project="$(MSBuildThisFileDirectory)runtime.$(TargetOS).$(MSBuildThisFile)" /> </Project> diff --git a/src/installer/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.pkgproj b/src/installer/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.pkgproj index 95172ed7a32..4e2bfe3bf0f 100644 --- a/src/installer/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.pkgproj +++ b/src/installer/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.pkgproj @@ -47,6 +47,6 @@ </ItemGroup> </Target> - <Import Condition="'$(PackageTargetRuntime)' != ''" Project="$(MSBuildThisFileDirectory)runtime.$(OSGroup).$(MSBuildProjectName).props" /> + <Import Condition="'$(PackageTargetRuntime)' != ''" Project="$(MSBuildThisFileDirectory)runtime.$(TargetOS).$(MSBuildProjectName).props" /> </Project> diff --git a/src/installer/pkg/projects/Microsoft.NETCore.DotNetHostPolicy/Microsoft.NETCore.DotNetHostPolicy.props b/src/installer/pkg/projects/Microsoft.NETCore.DotNetHostPolicy/Microsoft.NETCore.DotNetHostPolicy.props index 0d10ddb6f30..cdf7d9647bd 100644 --- a/src/installer/pkg/projects/Microsoft.NETCore.DotNetHostPolicy/Microsoft.NETCore.DotNetHostPolicy.props +++ b/src/installer/pkg/projects/Microsoft.NETCore.DotNetHostPolicy/Microsoft.NETCore.DotNetHostPolicy.props @@ -3,6 +3,6 @@ <Import Condition="'$(PackageTargetRuntime)' != ''" - Project="$(MSBuildThisFileDirectory)runtime.$(OSGroup).$(MSBuildThisFile)" /> + Project="$(MSBuildThisFileDirectory)runtime.$(TargetOS).$(MSBuildThisFile)" /> </Project> diff --git a/src/installer/pkg/projects/Microsoft.NETCore.DotNetHostResolver/Microsoft.NETCore.DotNetHostResolver.props b/src/installer/pkg/projects/Microsoft.NETCore.DotNetHostResolver/Microsoft.NETCore.DotNetHostResolver.props index 0d10ddb6f30..cdf7d9647bd 100644 --- a/src/installer/pkg/projects/Microsoft.NETCore.DotNetHostResolver/Microsoft.NETCore.DotNetHostResolver.props +++ b/src/installer/pkg/projects/Microsoft.NETCore.DotNetHostResolver/Microsoft.NETCore.DotNetHostResolver.props @@ -3,6 +3,6 @@ <Import Condition="'$(PackageTargetRuntime)' != ''" - Project="$(MSBuildThisFileDirectory)runtime.$(OSGroup).$(MSBuildThisFile)" /> + Project="$(MSBuildThisFileDirectory)runtime.$(TargetOS).$(MSBuildThisFile)" /> </Project> diff --git a/src/installer/pkg/projects/netcoreapp/Directory.Build.props b/src/installer/pkg/projects/netcoreapp/Directory.Build.props index 96aae41c707..844980466d1 100644 --- a/src/installer/pkg/projects/netcoreapp/Directory.Build.props +++ b/src/installer/pkg/projects/netcoreapp/Directory.Build.props @@ -2,15 +2,15 @@ <Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props, $(MSBuildThisFileDirectory)..))" /> <!-- - Determine CoreCLR/Libraries OSGroup based on Installer OSGroup. For example, + Determine CoreCLR/Libraries TargetOS based on Installer TargetOS. For example, Installer uses Unix when applicable, but others go straight to Linux. --> <PropertyGroup> - <CoreCLROSGroup Condition="'$(TargetsWindows)' == 'true'">Windows_NT</CoreCLROSGroup> - <CoreCLROSGroup Condition="'$(TargetsLinux)' == 'true'">Linux</CoreCLROSGroup> - <CoreCLROSGroup Condition="'$(TargetsOSX)' == 'true'">OSX</CoreCLROSGroup> - <CoreCLROSGroup Condition="'$(TargetsFreeBSD)' == 'true'">FreeBSD</CoreCLROSGroup> - <LibrariesOSGroup>$(CoreCLROSGroup)</LibrariesOSGroup> + <CoreCLRTargetOS Condition="'$(TargetsWindows)' == 'true'">Windows_NT</CoreCLRTargetOS> + <CoreCLRTargetOS Condition="'$(TargetsLinux)' == 'true'">Linux</CoreCLRTargetOS> + <CoreCLRTargetOS Condition="'$(TargetsOSX)' == 'true'">OSX</CoreCLRTargetOS> + <CoreCLRTargetOS Condition="'$(TargetsFreeBSD)' == 'true'">FreeBSD</CoreCLRTargetOS> + <LibrariesTargetOS>$(CoreCLRTargetOS)</LibrariesTargetOS> </PropertyGroup> <PropertyGroup> diff --git a/src/installer/signing/Directory.Build.targets b/src/installer/signing/Directory.Build.targets index 54023927c87..758aade86ed 100644 --- a/src/installer/signing/Directory.Build.targets +++ b/src/installer/signing/Directory.Build.targets @@ -27,7 +27,7 @@ CrossGenRootPath=$(CrossGenRootPath); ArtifactsBinDir=$(ArtifactsBinDir); ArtifactsPackagesDir=$(ArtifactsPackagesDir); - OSGroup=$(OSGroup); + TargetOS=$(TargetOS); TargetArchitecture=$(TargetArchitecture); NetCoreAppCurrent=$(NetCoreAppCurrent)" /> @@ -44,7 +44,7 @@ <Target Name="Build" Condition=" '$(SkipSigning)' != 'true' and - '$(OSGroup)' == 'Windows_NT'" + '$(TargetOS)' == 'Windows_NT'" DependsOnTargets=" EnsureProjectsBuilt; RunArcadeSigning" /> diff --git a/src/installer/test/Directory.Build.props b/src/installer/test/Directory.Build.props index fe4a7edd5f9..060df327ad8 100644 --- a/src/installer/test/Directory.Build.props +++ b/src/installer/test/Directory.Build.props @@ -13,11 +13,11 @@ </PropertyGroup> <PropertyGroup> - <TargetOSTrait Condition="'$(OSGroup)' == 'Windows_NT'">nonwindowstests</TargetOSTrait> - <TargetOSTrait Condition="'$(OSGroup)' == 'Linux'">nonlinuxtests</TargetOSTrait> - <TargetOSTrait Condition="'$(OSGroup)' == 'OSX'">nonosxtests</TargetOSTrait> - <TargetOSTrait Condition="'$(OSGroup)' == 'FreeBSD'">nonfreebsdtests</TargetOSTrait> - <TargetOSTrait Condition="'$(OSGroup)' == 'NetBSD'">nonnetbsdtests</TargetOSTrait> + <TargetOSTrait Condition="'$(TargetOS)' == 'Windows_NT'">nonwindowstests</TargetOSTrait> + <TargetOSTrait Condition="'$(TargetOS)' == 'Linux'">nonlinuxtests</TargetOSTrait> + <TargetOSTrait Condition="'$(TargetOS)' == 'OSX'">nonosxtests</TargetOSTrait> + <TargetOSTrait Condition="'$(TargetOS)' == 'FreeBSD'">nonfreebsdtests</TargetOSTrait> + <TargetOSTrait Condition="'$(TargetOS)' == 'NetBSD'">nonnetbsdtests</TargetOSTrait> <TestRunnerAdditionalArguments Condition="'$(TargetOSTrait)' != ''">-notrait category=$(TargetOSTrait)</TestRunnerAdditionalArguments> </PropertyGroup> diff --git a/src/installer/test/HostActivation.Tests/HostActivation.Tests.csproj b/src/installer/test/HostActivation.Tests/HostActivation.Tests.csproj index 6cee1d7dd8c..b6ebcd856f3 100644 --- a/src/installer/test/HostActivation.Tests/HostActivation.Tests.csproj +++ b/src/installer/test/HostActivation.Tests/HostActivation.Tests.csproj @@ -5,7 +5,7 @@ <AssemblyName>HostActivation.Tests</AssemblyName> <PackageId>HostActivation.Tests</PackageId> <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> - <DefineConstants Condition="'$(OSGroup)' == 'Windows_NT'">$(DefineConstants);WINDOWS</DefineConstants> + <DefineConstants Condition="'$(TargetOS)' == 'Windows_NT'">$(DefineConstants);WINDOWS</DefineConstants> <!-- Reduce the length of the test output dir to make it more reliable on Windows. --> <TestsOutputName>ha</TestsOutputName> <UsesTestAssets>true</UsesTestAssets> diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/ReadMe.SharedCode.md b/src/libraries/Common/src/System/Net/Http/aspnetcore/ReadMe.SharedCode.md index dcb4cc4f0e7..f24980b8a22 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/ReadMe.SharedCode.md +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/ReadMe.SharedCode.md @@ -28,8 +28,8 @@ dotnet/AspNetCore code paths: - Run restore in the root once: `PS D:\github\AspNetCore> .\restore.cmd` - Activate to use the repo local runtime: `PS D:\github\AspNetCore> . .\activate.ps1` - Build the individual projects: -- `(AspNetCore) PS D:\github\AspNetCore\src\Shared\test\Shared.Tests> dotnet msbuild` -- `(AspNetCore) PS D:\github\AspNetCore\src\servers\Kestrel\core\src> dotnet msbuild` +- `(AspNetCore) PS D:\github\AspNetCore\src\Shared\test\Shared.Tests> dotnet build` +- `(AspNetCore) PS D:\github\AspNetCore\src\servers\Kestrel\core\src> dotnet build` ### Running dotnet/AspNetCore tests: - `(AspNetCore) PS D:\github\AspNetCore\src\Shared\test\Shared.Tests> dotnet test` diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/AsnXml.targets b/src/libraries/Common/src/System/Security/Cryptography/Asn1/AsnXml.targets index 69434c44977..071432c841e 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/AsnXml.targets +++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/AsnXml.targets @@ -21,7 +21,7 @@ XmlInputPaths="@(AsnXml)" OutputPaths="@(AsnXml -> '$(IntermediateOutputPath)asnxml\%(filename).cs')" /> - <Exec Condition="'$(OSGroup)'=='Windows_NT'" + <Exec Condition="'$(TargetOS)'=='Windows_NT'" IgnoreExitCode="true" StandardOutputImportance="Low" Command="$(SystemRoot)\System32\fc.exe /a @(AsnXml -> '$(IntermediateOutputPath)asnxml\%(filename).cs') @(AsnXml -> '%(Identity).cs')"> @@ -29,7 +29,7 @@ </Exec> <!-- TODO: Call diff on Unix --> - <ItemGroup Condition="'$(OSGroup)'!='Windows_NT'"> + <ItemGroup Condition="'$(TargetOS)'!='Windows_NT'"> <_AsnXmlDiffCode Include="1" /> </ItemGroup> diff --git a/src/libraries/Directory.Build.props b/src/libraries/Directory.Build.props index b8e71b005fa..4ff8a6be977 100644 --- a/src/libraries/Directory.Build.props +++ b/src/libraries/Directory.Build.props @@ -1,4 +1,4 @@ -<Project TreatAsLocalProperty="OSGroup"> +<Project TreatAsLocalProperty="TargetOS"> <PropertyGroup> <SkipImportArcadeSdkFromRoot>true</SkipImportArcadeSdkFromRoot> </PropertyGroup> @@ -26,46 +26,30 @@ <RuntimeGraph>$(LibrariesProjectRoot)\OSGroups.json</RuntimeGraph> <BuildTargetFramework>netcoreapp5.0</BuildTargetFramework> <ShouldUnsetParentConfigurationAndPlatform>false</ShouldUnsetParentConfigurationAndPlatform> + <!-- TargetOS can be removed after renaming the property in arcade repo--> + <BuildOS>$(TargetOS)</BuildOS> <AdditionalBuildTargetFrameworks Condition="'$(BuildingInsideVisualStudio)' == 'true'">$(AdditionalBuildTargetFrameworks);$(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-NetBSD;$(NetCoreAppCurrent)-FreeBSD</AdditionalBuildTargetFrameworks> </PropertyGroup> <Import Project="$(RuntimePropsFile)" Condition="Exists('$(RuntimePropsFile)')"/> - <!-- Platform detection --> - <PropertyGroup> - <!-- - Use MSBuild property functions for platform detection: - https://docs.microsoft.com/en-us/visualstudio/msbuild/property-functions?view=vs-2019#msbuild-property-functions - Note that some of these intrinsic functions are implemented using RuntimeInformation: - https://github.com/Microsoft/msbuild/blob/3a9d1d2ae23e41b32a612ea6b0dce531fcf86be7/src/Build/Evaluation/IntrinsicFunctions.cs#L431 - --> - <DefaultOSGroup Condition="$([MSBuild]::IsOSPlatform('OSX'))">OSX</DefaultOSGroup> - <DefaultOSGroup Condition="'$(DefaultOSGroup)' == '' and $([MSBuild]::IsOSPlatform('FREEBSD'))">FreeBSD</DefaultOSGroup> - <DefaultOSGroup Condition="'$(DefaultOSGroup)' == '' and $([MSBuild]::IsOSPlatform('NETBSD'))">NetBSD</DefaultOSGroup> - <DefaultOSGroup Condition="'$(DefaultOSGroup)' == '' and $([MSBuild]::IsOSUnixLike())">Linux</DefaultOSGroup> - <DefaultOSGroup Condition="'$(DefaultOSGroup)' == '' and $([MSBuild]::IsOSPlatform('WINDOWS'))">Windows_NT</DefaultOSGroup> - </PropertyGroup> - <PropertyGroup> - <OSGroup Condition="'$(OSGroup)' == ''">$(DefaultOSGroup)</OSGroup> - <BuildOS>$(OSGroup)</BuildOS> - </PropertyGroup> <Import Sdk="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk" Project="Sdk.props" /> <PropertyGroup> <HostArch>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant)</HostArch> <ArchGroup Condition="'$(ArchGroup)' == '' and '$(HostArch)' == 'arm'">arm</ArchGroup> <ArchGroup Condition="'$(ArchGroup)' == '' and '$(HostArch)' == 'arm64'">arm64</ArchGroup> - <ArchGroup Condition="'$(ArchGroup)' == '' and '$(OSGroup)' == 'WebAssembly'">wasm</ArchGroup> + <ArchGroup Condition="'$(ArchGroup)' == '' and '$(TargetOS)' == 'WebAssembly'">wasm</ArchGroup> <ArchGroup Condition="'$(ArchGroup)' == ''">x64</ArchGroup> <!-- RuntimeOS is calculated based on the build system OS, however if building for WebAssembly we need to let the build system to use webassembly as the RuntimeOS for produced package RIDs. --> - <RuntimeOS Condition="'$(OSGroup)' == 'WebAssembly'">$(OSGroup.ToLowerInvariant())</RuntimeOS> + <RuntimeOS Condition="'$(TargetOS)' == 'WebAssembly'">$(TargetOS.ToLowerInvariant())</RuntimeOS> <!-- Initialize BuildSettings from the individual properties if it wasn't already explicitly set --> <Configuration Condition="'$(Configuration)'==''">Debug</Configuration> - <BuildSettings Condition="'$(BuildSettings)' == ''">$(BuildTargetFramework)-$(OSGroup)-$(Configuration)-$(ArchGroup)</BuildSettings> + <BuildSettings Condition="'$(BuildSettings)' == ''">$(BuildTargetFramework)-$(TargetOS)-$(Configuration)-$(ArchGroup)</BuildSettings> </PropertyGroup> <Choose> @@ -144,7 +128,7 @@ <!-- Common repo directories --> <PropertyGroup> <!-- Need to try and keep the same logic as the native builds as we need this for packaging --> - <NativeBinDir>$([MSBuild]::NormalizePath('$(ArtifactsBinDir)', 'native', '$(BuildTargetFramework)-$(OSGroup)-$(Configuration)-$(ArchGroup)'))</NativeBinDir> + <NativeBinDir>$([MSBuild]::NormalizePath('$(ArtifactsBinDir)', 'native', '$(BuildTargetFramework)-$(TargetOS)-$(Configuration)-$(ArchGroup)'))</NativeBinDir> <PkgDir>$([MSBuild]::NormalizeDirectory('$(LibrariesProjectRoot)', 'pkg'))</PkgDir> </PropertyGroup> @@ -167,7 +151,7 @@ <_runtimeOSFamily Condition="'$(_runtimeOSVersionIndex)' != '-1'">$(RuntimeOS.SubString(0, $(_runtimeOSVersionIndex)))</_runtimeOSFamily> <_portableOS>linux</_portableOS> <_portableOS Condition="'$(RuntimeOS)' == 'linux-musl'">linux-musl</_portableOS> - <_portableOS Condition="'$(_runtimeOSFamily)' == 'win' or '$(OSGroup)' == 'Windows_NT'">win</_portableOS> + <_portableOS Condition="'$(_runtimeOSFamily)' == 'win' or '$(TargetOS)' == 'Windows_NT'">win</_portableOS> <_portableOS Condition="'$(_runtimeOSFamily)' == 'osx'">osx</_portableOS> <_portableOS Condition="'$(_runtimeOSFamily)' == 'FreeBSD'">freebsd</_portableOS> <_portableOS Condition="'$(RuntimeOS)' == 'WebAssembly'">webassembly</_portableOS> @@ -183,15 +167,15 @@ <!-- There are no WebAssembly tools, so use the default ones --> <_buildingInOSX>$([MSBuild]::IsOSPlatform('OSX'))</_buildingInOSX> - <ToolRuntimeRID Condition="'$(RuntimeOS)' == 'webassembly' and '$(OSGroup)' == 'Windows_NT'">win-x64</ToolRuntimeRID> - <ToolRuntimeRID Condition="'$(RuntimeOS)' == 'webassembly' and '$(OSGroup)' != 'Windows_NT' and $(_buildingInOSX)">osx-x64</ToolRuntimeRID> - <ToolRuntimeRID Condition="'$(RuntimeOS)' == 'webassembly' and '$(OSGroup)' != 'Windows_NT' and !$(_buildingInOSX)">linux-x64</ToolRuntimeRID> + <ToolRuntimeRID Condition="'$(RuntimeOS)' == 'webassembly' and '$(TargetOS)' == 'Windows_NT'">win-x64</ToolRuntimeRID> + <ToolRuntimeRID Condition="'$(RuntimeOS)' == 'webassembly' and '$(TargetOS)' != 'Windows_NT' and $(_buildingInOSX)">osx-x64</ToolRuntimeRID> + <ToolRuntimeRID Condition="'$(RuntimeOS)' == 'webassembly' and '$(TargetOS)' != 'Windows_NT' and !$(_buildingInOSX)">linux-x64</ToolRuntimeRID> <!-- support cross-targeting by choosing a RID to restore when running on a different machine that what we're build for --> - <_portableOS Condition="'$(OSGroup)' == 'Unix' and '$(_runtimeOSFamily)' != 'osx' and '$(_runtimeOSFamily)' != 'FreeBSD' and '$(_runtimeOS)' != 'linux-musl'">linux</_portableOS> + <_portableOS Condition="'$(TargetOS)' == 'Unix' and '$(_runtimeOSFamily)' != 'osx' and '$(_runtimeOSFamily)' != 'FreeBSD' and '$(_runtimeOS)' != 'linux-musl'">linux</_portableOS> <!-- support cross-targeting by choosing a RID to restore when running on a different machine that what we're build for --> - <_portableOS Condition="'$(OSGroup)' == 'Unix' and '$(_runtimeOSFamily)' != 'osx' and '$(_runtimeOSFamily)' != 'FreeBSD' and '$(_runtimeOS)' != 'linux-musl'">linux</_portableOS> + <_portableOS Condition="'$(TargetOS)' == 'Unix' and '$(_runtimeOSFamily)' != 'osx' and '$(_runtimeOSFamily)' != 'FreeBSD' and '$(_runtimeOS)' != 'linux-musl'">linux</_portableOS> <_packageRID /> <_packageRID Condition="'$(PortableBuild)' == 'true'">$(_portableOS)-$(ArchGroup)</_packageRID> @@ -237,7 +221,7 @@ <DebugType>portable</DebugType> <!-- Empty DebugType when building for netfx and in windows so that it is set to full or pdbonly later --> - <DebugType Condition="'$(TargetsNetFx)' == 'true' and '$(OSGroup)' == 'Windows_NT'" /> + <DebugType Condition="'$(TargetsNetFx)' == 'true' and '$(TargetOS)' == 'Windows_NT'" /> <!-- Workaround for codecov issue https://github.com/tonerdo/coverlet/issues/312 --> <EnableSourceLink Condition="'$(ContinuousIntegrationBuild)' != 'true' and '$(OfficialBuildId)' == ''">false</EnableSourceLink> @@ -315,7 +299,7 @@ <ILAsmToolPath>$([MSBuild]::NormalizeDirectory('$(ArtifactsToolsetDir)', 'ilasm'))</ILAsmToolPath> <!-- Helix properties --> - <OSPlatformConfig>$(OSGroup).$(Platform).$(Configuration)</OSPlatformConfig> + <OSPlatformConfig>$(TargetOS).$(Platform).$(Configuration)</OSPlatformConfig> <AnyOSPlatformConfig>AnyOS.AnyCPU.$(Configuration)</AnyOSPlatformConfig> <UnixPlatformConfig>Unix.$(Platform).$(Configuration)</UnixPlatformConfig> <TestArchiveRoot>$(ArtifactsDir)helix/</TestArchiveRoot> diff --git a/src/libraries/Directory.Build.targets b/src/libraries/Directory.Build.targets index 2d5b32f022e..28f649819e6 100644 --- a/src/libraries/Directory.Build.targets +++ b/src/libraries/Directory.Build.targets @@ -1,8 +1,8 @@ <Project InitialTargets="AddSkipGetTargetFrameworkToProjectReferences"> <PropertyGroup> - <CoreCLROSGroup Condition="'$(CoreCLROSGroup)' == ''">$(OSGroup)</CoreCLROSGroup> + <CoreCLRTargetOS Condition="'$(CoreCLRTargetOS)' == ''">$(TargetOS)</CoreCLRTargetOS> <CoreCLRConfiguration Condition="'$(CoreCLRConfiguration)' == ''">$(Configuration)</CoreCLRConfiguration> - <MonoOSGroup Condition="'$(MonoCLROSGroup)' == ''">$(OSGroup)</MonoOSGroup> + <MonoTargetOS Condition="'$(MonoCLROSGroup)' == ''">$(TargetOS)</MonoTargetOS> <MonoConfiguration Condition="'$(MonoConfiguration)' == ''">$(Configuration)</MonoConfiguration> </PropertyGroup> @@ -53,15 +53,15 @@ <ItemGroup Condition="'@(BinPlaceTargetFrameworks)' == ''"> <!-- binplace to directories for the target vertical --> - <BinPlaceTargetFrameworks Include="$(BuildTargetFramework)-$(OSGroup)" Condition="'$(BinPlaceForTargetVertical)' == 'true'"> + <BinPlaceTargetFrameworks Include="$(BuildTargetFramework)-$(TargetOS)" Condition="'$(BinPlaceForTargetVertical)' == 'true'"> <RefPath>$(BuildTargetFrameworkRefPath)</RefPath> <RuntimePath>$(RuntimePath)</RuntimePath> </BinPlaceTargetFrameworks> <!-- binplace to directories for packages --> - <BinPlaceTargetFrameworks Condition="'$(IsNETCoreApp)' == 'true' and '$(BuildingNETCoreAppVertical)' == 'true'" Include="$(NetCoreAppCurrent)-$(OSGroup)"> + <BinPlaceTargetFrameworks Condition="'$(IsNETCoreApp)' == 'true' and '$(BuildingNETCoreAppVertical)' == 'true'" Include="$(NetCoreAppCurrent)-$(TargetOS)"> <PackageFileRefPath Condition="'$(IsNETCoreAppRef)' == 'true'">$(NETCoreAppPackageRefPath)</PackageFileRefPath> <PackageFileRuntimePath>$(NETCoreAppPackageRuntimePath)</PackageFileRuntimePath> - <RuntimePath Condition="'$(BinPlaceNETCoreAppPackage)' == 'true'">$(NETCoreAppPackageRuntimePath)\..\runtime\$(OSGroup)-$(Configuration)-$(ArchGroup)</RuntimePath> + <RuntimePath Condition="'$(BinPlaceNETCoreAppPackage)' == 'true'">$(NETCoreAppPackageRuntimePath)\..\runtime\$(TargetOS)-$(Configuration)-$(ArchGroup)</RuntimePath> <RefPath Condition="'$(BinPlaceNETCoreAppPackage)' == 'true' and '$(IsNETCoreAppRef)' == 'true'">$(RefRootPath)microsoft.netcore.app\$(Configuration)</RefPath> <!-- enable trimming for any runtime project that's part of the shared framework and hasn't already set ILLinkTrimAssembly --> <SetProperties Condition="'$(BinPlaceRuntime)' == 'true' and '$(ILLinkTrimAssembly)' == ''">ILLinkTrimAssembly=true</SetProperties> @@ -72,7 +72,7 @@ </BinPlaceTargetFrameworks> <!-- Setup the shared framework directory for testing --> - <BinPlaceTargetFrameworks Condition="'$(BinPlaceTestSharedFramework)' == 'true'" Include="$(NetCoreAppCurrent)-$(OSGroup)"> + <BinPlaceTargetFrameworks Condition="'$(BinPlaceTestSharedFramework)' == 'true'" Include="$(NetCoreAppCurrent)-$(TargetOS)"> <RuntimePath>$(NETCoreAppTestSharedFrameworkPath)</RuntimePath> </BinPlaceTargetFrameworks> <BinPlaceTargetFrameworks Condition="'$(BinPlaceNETFXRuntime)' == 'true'" Include="$(NetFrameworkCurrent)-Windows_NT"> @@ -96,7 +96,7 @@ <RefPath>$(RefRootPath)%(Identity)/</RefPath> </BinPlaceTargetFrameworks> <!-- for BuildAllConfigurations make sure runtimepaths are created for all vertical target frameworks. --> - <BinPlaceTargetFrameworks Condition="'$(BuildAllConfigurations)' == 'true' and ('$(BinPlaceForTargetVertical)' == 'true' or ('$(TargetFramework)' != '$(NetCoreAppCurrent)' and '$(TargetFrameworkSuffix)' == ''))" Include="$(NetCoreAppCurrent)-$(OSGroup)"> + <BinPlaceTargetFrameworks Condition="'$(BuildAllConfigurations)' == 'true' and ('$(BinPlaceForTargetVertical)' == 'true' or ('$(TargetFramework)' != '$(NetCoreAppCurrent)' and '$(TargetFrameworkSuffix)' == ''))" Include="$(NetCoreAppCurrent)-$(TargetOS)"> <RuntimePath>$(ArtifactsBinDir)runtime/%(Identity)-$(Configuration)-$(ArchGroup)</RuntimePath> </BinPlaceTargetFrameworks> diff --git a/src/libraries/Microsoft.XmlSerializer.Generator/tests/Microsoft.XmlSerializer.Generator.Tests.csproj b/src/libraries/Microsoft.XmlSerializer.Generator/tests/Microsoft.XmlSerializer.Generator.Tests.csproj index 12282f5ed69..705bfc819ba 100644 --- a/src/libraries/Microsoft.XmlSerializer.Generator/tests/Microsoft.XmlSerializer.Generator.Tests.csproj +++ b/src/libraries/Microsoft.XmlSerializer.Generator/tests/Microsoft.XmlSerializer.Generator.Tests.csproj @@ -10,8 +10,8 @@ <GeneratorRuntimeConfig>$(MSBuildToolsPath)\MSBuild.runtimeconfig.json</GeneratorRuntimeConfig> <GeneratorCommand Condition="'$(TargetsNetCoreApp)' == 'true'">"$(TestHostRootPath)$([System.IO.Path]::GetFileName('$(DotNetTool)'))" --fx-version $(ProductVersion)</GeneratorCommand> <GeneratorCommand Condition="'$(TargetsNetCoreApp)' != 'true'">"$(DotNetTool)"</GeneratorCommand> - <GeneratorCommand Condition="'$(OSGroup)' == 'Windows_NT'">set DOTNET_MULTILEVEL_LOOKUP=0 & $(GeneratorCommand)</GeneratorCommand> - <GeneratorCommand Condition="'$(OSGroup)' != 'Windows_NT'">export DOTNET_MULTILEVEL_LOOKUP=0 && $(GeneratorCommand)</GeneratorCommand> + <GeneratorCommand Condition="'$(TargetOS)' == 'Windows_NT'">set DOTNET_MULTILEVEL_LOOKUP=0 & $(GeneratorCommand)</GeneratorCommand> + <GeneratorCommand Condition="'$(TargetOS)' != 'Windows_NT'">export DOTNET_MULTILEVEL_LOOKUP=0 && $(GeneratorCommand)</GeneratorCommand> </PropertyGroup> <ItemGroup Condition=" '$(SkipTestsOnPlatform)' != 'true' "> <Compile Include=".\SGenTests.cs" /> diff --git a/src/libraries/Native/build-native.cmd b/src/libraries/Native/build-native.cmd index 3939db70608..f59b71c0819 100644 --- a/src/libraries/Native/build-native.cmd +++ b/src/libraries/Native/build-native.cmd @@ -11,7 +11,7 @@ set __IntermediatesDir="" set __BuildArch=x64 set __BuildTarget="build" set __VCBuildArch=x86_amd64 -set __BuildOS=Windows_NT +set __TargetOS=Windows_NT set CMAKE_BUILD_TYPE=Debug set "__LinkArgs= " set "__LinkLibraries= " @@ -32,7 +32,7 @@ if /i [%1] == [wasm] ( set __BuildArch=wasm&&set __VCBuildArch=x86_amd64& if /i [%1] == [outconfig] ( set __outConfig=%2&&shift&&shift&goto Arg_Loop) -if /i [%1] == [WebAssembly] ( set __BuildOS=WebAssembly&&shift&goto Arg_Loop) +if /i [%1] == [WebAssembly] ( set __TargetOS=WebAssembly&&shift&goto Arg_Loop) if /i [%1] == [rebuild] ( set __BuildTarget=rebuild&&shift&goto Arg_Loop) @@ -94,7 +94,7 @@ echo Commencing build of native components echo. -if [%__outConfig%] == [] set __outConfig=%__BuildOS%-%__BuildArch%-%CMAKE_BUILD_TYPE% +if [%__outConfig%] == [] set __outConfig=%__TargetOS%-%__BuildArch%-%CMAKE_BUILD_TYPE% if %__CMakeBinDir% == "" ( set "__CMakeBinDir=%__artifactsDir%\bin\native\%__outConfig%" diff --git a/src/libraries/Native/build-native.proj b/src/libraries/Native/build-native.proj index 466a0363d30..9019802d793 100644 --- a/src/libraries/Native/build-native.proj +++ b/src/libraries/Native/build-native.proj @@ -6,13 +6,13 @@ <PropertyGroup> <!-- Hardcode version paths in a global location. --> - <NativeVersionFile Condition="'$(OSGroup)' == 'Windows_NT'">$(ArtifactsObjDir)_version.h</NativeVersionFile> - <NativeVersionFile Condition="'$(OSGroup)' != 'Windows_NT'">$(ArtifactsObjDir)_version.c</NativeVersionFile> - <_BuildNativeArgs>$(ArchGroup) $(Configuration) outconfig $(BuildTargetFramework)-$(OSGroup)-$(Configuration)-$(ArchGroup)</_BuildNativeArgs> + <NativeVersionFile Condition="'$(TargetOS)' == 'Windows_NT'">$(ArtifactsObjDir)_version.h</NativeVersionFile> + <NativeVersionFile Condition="'$(TargetOS)' != 'Windows_NT'">$(ArtifactsObjDir)_version.c</NativeVersionFile> + <_BuildNativeArgs>$(ArchGroup) $(Configuration) outconfig $(BuildTargetFramework)-$(TargetOS)-$(Configuration)-$(ArchGroup)</_BuildNativeArgs> </PropertyGroup> <Target Name="BuildNativeUnix" - Condition="'$(OSGroup)' != 'Windows_NT'"> + Condition="'$(TargetOS)' != 'Windows_NT'"> <PropertyGroup> <!-- @@ -20,7 +20,7 @@ then we should consider calling Environment.ProcessorCount --> <_ProcessorCountArg> -numproc $(MSBuildNodeCount)</_ProcessorCountArg> - <_StripSymbolsArg Condition="'$(BuildNativeStripSymbols)' == 'true' and '$(OSGroup)' != 'WebAssembly'"> -stripsymbols</_StripSymbolsArg> + <_StripSymbolsArg Condition="'$(BuildNativeStripSymbols)' == 'true' and '$(TargetOS)' != 'WebAssembly'"> -stripsymbols</_StripSymbolsArg> <_PortableBuildArg Condition="'$(PortableBuild)' != 'true'"> -portablebuild=false</_PortableBuildArg> <_CrossBuildArg Condition="'$(CrossBuild)' == 'true'"> -cross</_CrossBuildArg> <_CMakeArgs Condition="'$(CMakeArgs)' != ''"> $(CMakeArgs)</_CMakeArgs> @@ -40,7 +40,7 @@ <!-- We don't have any native components when building for netfx. --> <Target Name="BuildNativeWindows" - Condition="'$(OSGroup)' == 'Windows_NT' and '$(TargetsNetFx)' != 'true'"> + Condition="'$(TargetOS)' == 'Windows_NT' and '$(TargetsNetFx)' != 'true'"> <!-- Run script that invokes Cmake to create VS files, and then calls msbuild to compile them --> <Message Text=""$(MSBuildProjectDirectory)\build-native.cmd" $(_BuildNativeArgs)" Importance="High"/> diff --git a/src/libraries/Native/build-native.sh b/src/libraries/Native/build-native.sh index 9f0031031e8..b7f51f501a0 100755 --- a/src/libraries/Native/build-native.sh +++ b/src/libraries/Native/build-native.sh @@ -27,7 +27,7 @@ handle_arguments() { # Set the various build properties here so that CMake and MSBuild can pick them up __BuildArch=x64 -__BuildOS=Linux +__TargetOS=Linux __BuildType=Debug __CMakeArgs="" __Compiler=clang @@ -63,12 +63,12 @@ else fi # set default OSX deployment target -if [[ "$__BuildOS" == OSX ]]; then +if [[ "$__TargetOS" == OSX ]]; then __CMakeArgs="-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 $__CMakeArgs" fi # Set the remaining variables based upon the determined build configuration -__outConfig="${__outConfig:-"$__BuildOS-$__BuildArch-$__BuildType"}" +__outConfig="${__outConfig:-"$__TargetOS-$__BuildArch-$__BuildType"}" __IntermediatesDir="$__RootBinDir/obj/native/$__outConfig" __BinDir="$__RootBinDir/bin/native/$__outConfig" diff --git a/src/libraries/restore/runtime/runtime.depproj b/src/libraries/restore/runtime/runtime.depproj index d6d3c9c8419..0abad684572 100644 --- a/src/libraries/restore/runtime/runtime.depproj +++ b/src/libraries/restore/runtime/runtime.depproj @@ -5,9 +5,9 @@ <RuntimeIdentifier Condition="'$(RuntimeOS)' == 'webassembly'">$(ToolRuntimeRID)</RuntimeIdentifier> <NoWarn>$(NoWarn);NU1603;NU1605</NoWarn> <SwapNativeForIL Condition="'$(SwapNativeForIL)' == '' and ('$(Configuration)' == 'Debug' or '$(Coverage)' == 'true') and '$(RuntimeFlavor)' != 'Mono'">true</SwapNativeForIL> - <CoreCLROSGroup Condition="'$(CoreCLROSGroup)' == ''">$(OSGroup)</CoreCLROSGroup> + <CoreCLRTargetOS Condition="'$(CoreCLRTargetOS)' == ''">$(TargetOS)</CoreCLRTargetOS> <CoreCLRConfiguration Condition="'$(CoreCLRConfiguration)' == ''">$(Configuration)</CoreCLRConfiguration> - <MonoOSGroup Condition="'$(MonoOSGroup)' == ''">$(DefaultOSGroup)</MonoOSGroup> + <MonoTargetOS Condition="'$(MonoTargetOS)' == ''">$(DefaultOSGroup)</MonoTargetOS> <MonoConfiguration Condition="'$(MonoConfiguration)' == ''">$(Configuration)</MonoConfiguration> <BinPlaceForTargetVertical>false</BinPlaceForTargetVertical> <TargetFrameworks>netcoreapp3.0-Windows_NT;netcoreapp3.0-Unix;$(netcoreappCurrent)-Windows_NT;$(netcoreappCurrent)-Unix</TargetFrameworks> @@ -70,7 +70,7 @@ SkipUnchangedFiles="true" UseHardlinksIfPossible="$(UseHardlink)" /> - <Exec Command="chmod +x $(TestHostRootPath)%(DotnetExe.Filename)%(DotnetExe.Extension)" Condition="'$(OSGroup)' != 'Windows_NT'"/> + <Exec Command="chmod +x $(TestHostRootPath)%(DotnetExe.Filename)%(DotnetExe.Extension)" Condition="'$(TargetOS)' != 'Windows_NT'"/> </Target> <Target Name="OverrideRuntimeCoreCLR" diff --git a/src/libraries/sendtohelix.proj b/src/libraries/sendtohelix.proj index 4e8715f4761..9d92057a4da 100644 --- a/src/libraries/sendtohelix.proj +++ b/src/libraries/sendtohelix.proj @@ -64,8 +64,8 @@ and we exit /b at the end of RunTests.cmd, Helix runs some other commands after ours within the bat script, if we don't use call, then we cause the parent script to exit, and anything after will not be executed. --> - <HelixCommand Condition="'$(OSGroup)' == 'Windows_NT'">call RunTests.cmd --runtime-path %HELIX_CORRELATION_PAYLOAD%</HelixCommand> - <HelixCommand Condition="'$(OSGroup)' != 'Windows_NT'">./RunTests.sh --runtime-path "$HELIX_CORRELATION_PAYLOAD"</HelixCommand> + <HelixCommand Condition="'$(TargetOS)' == 'Windows_NT'">call RunTests.cmd --runtime-path %HELIX_CORRELATION_PAYLOAD%</HelixCommand> + <HelixCommand Condition="'$(TargetOS)' != 'Windows_NT'">./RunTests.sh --runtime-path "$HELIX_CORRELATION_PAYLOAD"</HelixCommand> <!-- TODO: remove rsp argument when rsp files are removed: https://github.com/dotnet/runtime/issues/1980. --> <HelixCommand Condition="'$(RuntimeFlavor)' == 'mono'">$(HelixCommand) --rsp-file "$(MonoRspFileName)"</HelixCommand> </PropertyGroup> diff --git a/src/libraries/shims/manual/Directory.Build.props b/src/libraries/shims/manual/Directory.Build.props index a098787b81d..8392d98fd7f 100644 --- a/src/libraries/shims/manual/Directory.Build.props +++ b/src/libraries/shims/manual/Directory.Build.props @@ -13,10 +13,10 @@ <IsRuntimeAssembly>true</IsRuntimeAssembly> <BaseIntermediateOutputPath>$([MSBuild]::NormalizeDirectory('$(ArtifactsObjDir)', '$(OutDirName)'))</BaseIntermediateOutputPath> <IntermediateOutputPath>$(BaseIntermediateOutputPath)$(TargetFramework)-$(Configuration)</IntermediateOutputPath> - <!-- Use runtime assemblies for the TargetFramework, using build configuration OSGroup --> - <RefPath>$(ArtifactsBinDir)runtime/$(BuildTargetFramework)-$(OSGroup)-$(Configuration)-$(ArchGroup)/</RefPath> - <CoreCLROSGroup>$(OSGroup)</CoreCLROSGroup> - <MonoOSGroup>$(OSGroup)</MonoOSGroup> + <!-- Use runtime assemblies for the TargetFramework, using TargetOS --> + <RefPath>$(ArtifactsBinDir)runtime/$(BuildTargetFramework)-$(TargetOS)-$(Configuration)-$(ArchGroup)/</RefPath> + <CoreCLRTargetOS>$(TargetOS)</CoreCLRTargetOS> + <MonoTargetOS>$(TargetOS)</MonoTargetOS> <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks> </PropertyGroup> diff --git a/src/mono/netcore/nuget/Directory.Build.props b/src/mono/netcore/nuget/Directory.Build.props index 9a0aea09a9f..1d2f7ba8f39 100644 --- a/src/mono/netcore/nuget/Directory.Build.props +++ b/src/mono/netcore/nuget/Directory.Build.props @@ -19,7 +19,7 @@ <_distroRidIndex>$(_parseDistroRid.IndexOfAny("-"))</_distroRidIndex> <_archRidIndex>$([MSBuild]::Add($(_distroRidIndex), 1))</_archRidIndex> <OSRid Condition="'$(OSRid)' == '' and '$(_distroRidIndex)' != '-1'">$(_parseDistroRid.SubString(0, $(_distroRidIndex)))</OSRid> - <OSRid Condition="'$(OSRid)' == ''">$(MonoOSGroup)</OSRid> + <OSRid Condition="'$(OSRid)' == ''">$(MonoTargetOS)</OSRid> <RuntimeOS Condition="'$(RuntimeOS)' == ''">$(OSRid)</RuntimeOS> diff --git a/tools-local/scripts/dev/master-build-deb-rpm-docker.sh b/tools-local/scripts/dev/master-build-deb-rpm-docker.sh index 0f771990f62..7b26ed6ceca 100755 --- a/tools-local/scripts/dev/master-build-deb-rpm-docker.sh +++ b/tools-local/scripts/dev/master-build-deb-rpm-docker.sh @@ -66,7 +66,7 @@ package() { tools-local/tasks/installer.tasks/installer.tasks.csproj \ /t:Restore /t:Build /t:CreateHostMachineInfoFile \ /p:Configuration=Release \ - /p:OSGroup=Linux \ + /p:TargetOS=Linux \ /p:PortableBuild=false \ /p:TargetArchitecture=x64 \ /bl:artifacts/msbuild.$name.traversaldependencies.binlog; @@ -79,7 +79,7 @@ package() { /p:InstallerSourceOSPlatformConfig=linux-x64.Release \ /p:GenerateProjectInstallers=true \ /p:Configuration=Release \ - /p:OSGroup=Linux \ + /p:TargetOS=Linux \ /p:PortableBuild=false \ /p:TargetArchitecture=x64 \ /bl:artifacts/msbuild.$name.installers.binlog" diff --git a/tools-local/scripts/dev/release-2.1-build-deb-rpm-docker.sh b/tools-local/scripts/dev/release-2.1-build-deb-rpm-docker.sh index 3ab598450d2..cb803a342f8 100755 --- a/tools-local/scripts/dev/release-2.1-build-deb-rpm-docker.sh +++ b/tools-local/scripts/dev/release-2.1-build-deb-rpm-docker.sh @@ -58,7 +58,7 @@ package() { build.proj \ /t:BuildTraversalBuildDependencies \ /p:ConfigurationGroup=Release \ - /p:OSGroup=Linux \ + /p:TargetOS=Linux \ /p:PortableBuild=false \ /p:TargetArchitecture=x64 \ "/bl:bin/msbuild.$name.traversaldependencies.binlog" @@ -71,7 +71,7 @@ package() { /p:InstallerSourceOSPlatformConfig=linux-x64.Release \ /p:GenerateProjectInstallers=true \ /p:ConfigurationGroup=Release \ - /p:OSGroup=Linux \ + /p:TargetOS=Linux \ /p:PortableBuild=false \ /p:TargetArchitecture=x64 \ "/bl:bin/msbuild.$name.installers.binlog" |