Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Unifying duplicate msbuild properties in CoreCLR build #34261

Merged
merged 3 commits into from
Mar 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/workflow/testing/coreclr/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 build <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:Configuration=Release
```

## Additional Documents
Expand Down
4 changes: 2 additions & 2 deletions docs/workflow/testing/coreclr/unix-test-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:__TargetOS=[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:__TargetOS=<TargetOS> /p:__BuildType=<BuildType>
/path/to/runtime/dotnet.sh msbuild src/coreclr/tests/src/path-to-proj-file /p:TargetOS=<TargetOS> /p:Configuration=<BuildType>
```

## Running Tests
Expand Down
13 changes: 6 additions & 7 deletions eng/Configurations.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@
</PropertyGroup>

<PropertyGroup>
<__TargetOS Condition="'$(__TargetOS)' == '' and $([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>
<TargetOS Condition="'$(TargetOS)' == '' and $([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>
<CoreCLRTargetOS Condition="'$(CoreCLRTargetOS)' == ''">$(TargetOS)</CoreCLRTargetOS>
<MonoTargetOS Condition="'$(MonoTargetOS)' == ''">$(TargetOS)</MonoTargetOS>
<LibrariesTargetOS Condition="'$(LibrariesTargetOS)' == ''">$(TargetOS)</LibrariesTargetOS>
</PropertyGroup>
</Project>
</Project>
2 changes: 1 addition & 1 deletion eng/native/build-commons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ else
__NumProc=$(nproc --all)
fi

__CommonMSBuildArgs="/p:__BuildArch=$__BuildArch /p:__BuildType=$__BuildType /p:__TargetOS=$__TargetOS /nodeReuse:false $__OfficialBuildIdArg $__SignTypeArg $__SkipRestoreArg"
__CommonMSBuildArgs="/p:TargetArchitecture=$__BuildArch /p:Configuration=$__BuildType /p:TargetOS=$__TargetOS /nodeReuse:false $__OfficialBuildIdArg $__SignTypeArg $__SkipRestoreArg"

# Configure environment if we are doing a verbose build
if [[ "$__VerboseBuild" == 1 ]]; then
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/coreclr/templates/build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,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:TargetOS=$(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:TargetArchitecture=$(archType) /p:Configuration=$(_BuildConfig) /p:DotNetSignType=$env:_SignType -projects $(Build.SourcesDirectory)\eng\empty.csproj
displayName: Sign Binaries

- task: PublishPipelineArtifact@1
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/mono/templates/build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,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:__TargetOS=$(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:Configuration=$(_BuildConfig) /p:TargetArchitecture=$(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
Expand All @@ -130,7 +130,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:__TargetOS=$(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:Configuration=$(_BuildConfig) /p:TargetArchitecture=$(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
Expand Down
1 change: 0 additions & 1 deletion eng/testing/tests.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project>
<PropertyGroup>
<TargetOS Condition="'$(TargetOS)' == ''">$(DefaultOSGroup)</TargetOS>
<RunWorkingDirectory>$(OutDir)</RunWorkingDirectory>

<RunScriptInputName Condition="'$(TargetOS)' == 'Windows_NT'">RunnerTemplate.cmd</RunScriptInputName>
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/build-runtime.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ REM __PassThroughArgs is a set of things that will be passed through to nested c
REM when using "all".
set __PassThroughArgs=

REM __UnprocessedBuildArgs are args that we pass to msbuild (e.g. /p:__BuildArch=x64)
REM __UnprocessedBuildArgs are args that we pass to msbuild (e.g. /p:TargetArchitecture=x64)
set "__args= %*"
set processedArgs=
set __UnprocessedBuildArgs=
Expand Down Expand Up @@ -223,7 +223,7 @@ if %__BuildTypeDebug%==1 set __BuildType=Debug
if %__BuildTypeChecked%==1 set __BuildType=Checked
Copy link
Member Author

Choose a reason for hiding this comment

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

I am not renaming any variables in shell scripts to make the change manageable.

if %__BuildTypeRelease%==1 set __BuildType=Release

set __CommonMSBuildArgs=/p:__TargetOS=%__TargetOS% /p:__BuildType=%__BuildType% /p:__BuildArch=%__BuildArch%
set __CommonMSBuildArgs=/p:TargetOS=%__TargetOS% /p:Configuration=%__BuildType% /p:TargetArchitecture=%__BuildArch%

if %__EnforcePgo%==1 (
if %__BuildArchArm%==1 (
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/build-test.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ set "__MsbuildDebugLogsDir=%__LogsDir%\MsbuildDebugLogs"
:: Default __Exclude to issues.targets
set __Exclude=%__TestDir%\issues.targets

REM __UnprocessedBuildArgs are args that we pass to msbuild (e.g. /p:__BuildArch=x64)
REM __UnprocessedBuildArgs are args that we pass to msbuild (e.g. /p:TargetArchitecture=x64)
set "__args= %*"
set processedArgs=
set __UnprocessedBuildArgs=
Expand Down Expand Up @@ -141,8 +141,8 @@ if "%__TargetsWindows%"=="1" (

@if defined _echo @echo on

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
set __CommonMSBuildArgs=/p:TargetOS=%__TargetOS% /p:Configuration=%__BuildType% /p:TargetArchitecture=%__BuildArch%
set __msbuildArgs=/p:TargetOS=%__TargetOS% /p:Configuration=%__BuildType% /p:TargetArchitecture=%__BuildArch% /nologo /verbosity:minimal /clp:Summary /maxcpucount

echo %__MsgPrefix%Commencing CoreCLR test build

Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/build-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ build_test_wrappers()
__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:__TargetOS=$__TargetOS /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:Configuration=$__BuildType /p:TargetArchitecture=$__BuildArch"
eval $nextCommand

local exitCode="$?"
Expand Down Expand Up @@ -90,7 +90,7 @@ generate_layout()
MSBUILDDEBUGPATH="${__MsbuildDebugLogsDir}"
export MSBUILDDEBUGPATH

__BuildProperties="-p:TargetOS=${__TargetOS} -p:BuildArch=${__BuildArch} -p:BuildType=${__BuildType}"
__BuildProperties="-p:TargetOS=${__TargetOS} -p:TargetArchitecture=${__BuildArch} -p:Configuration=${__BuildType}"

# =========================================================================================
# ===
Expand Down Expand Up @@ -311,7 +311,7 @@ build_Tests()
MSBUILDDEBUGPATH="${__MsbuildDebugLogsDir}"
export MSBUILDDEBUGPATH

__BuildProperties="-p:TargetOS=${__TargetOS} -p:BuildArch=${__BuildArch} -p:BuildType=${__BuildType}"
__BuildProperties="-p:TargetOS=${__TargetOS} -p:TargetArchitecture=${__BuildArch} -p:Configuration=${__BuildType}"

# =========================================================================================
# ===
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ REM __PassThroughArgs is a set of things that will be passed through to nested c
REM when using "all".
set __PassThroughArgs=

REM __UnprocessedBuildArgs are args that we pass to msbuild (e.g. /p:__BuildArch=x64)
REM __UnprocessedBuildArgs are args that we pass to msbuild (e.g. /p:TargetArchitecture=x64)
set "__args= %*"
set processedArgs=
set __UnprocessedBuildArgs=
Expand Down Expand Up @@ -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:__TargetOS=%__TargetOS% /p:__BuildType=%__BuildType% /p:__BuildArch=%__BuildArch% !__SkipRestoreArg! !__OfficialBuildIdArg!
set __CommonMSBuildArgs=/p:TargetOS=%__TargetOS% /p:Configuration=%__BuildType% /p:TargetArchitecture=%__BuildArch% !__SkipRestoreArg! !__OfficialBuildIdArg!

if %__EnforcePgo%==1 (
if %__BuildArchArm%==1 (
Expand Down Expand Up @@ -664,7 +664,7 @@ if %__BuildCoreLib% EQU 1 (

if "%__BuildManagedTools%" == "1" (
echo %__MsgPrefix%Publishing crossgen2...
call %__RepoRootDir%\dotnet.cmd publish --self-contained -r win-%__BuildArch% -c %__BuildType% -o "%__BinDir%\crossgen2" "%__ProjectDir%\src\tools\crossgen2\crossgen2\crossgen2.csproj" /nologo /p:BuildArch=%__BuildArch%
call %__RepoRootDir%\dotnet.cmd publish --self-contained -r win-%__BuildArch% -c %__BuildType% -o "%__BinDir%\crossgen2" "%__ProjectDir%\src\tools\crossgen2\crossgen2\crossgen2.csproj" /nologo /p:TargetArchitecture=%__BuildArch%

if not !errorlevel! == 0 (
echo %__ErrMsgPrefix%%__MsgPrefix%Error: Failed to build crossgen2.
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ build_CoreLib()

if [[ "$__BuildManagedTools" -eq "1" ]]; then
echo "Publishing crossgen2 for $__DistroRid"
"$__RepoRootDir/dotnet.sh" publish --self-contained -r $__DistroRid -c $__BuildType -o "$__BinDir/crossgen2" "$__ProjectRoot/src/tools/crossgen2/crossgen2/crossgen2.csproj" /nologo /p:BuildArch=$__BuildArch
"$__RepoRootDir/dotnet.sh" publish --self-contained -r $__DistroRid -c $__BuildType -o "$__BinDir/crossgen2" "$__ProjectRoot/src/tools/crossgen2/crossgen2/crossgen2.csproj" /nologo /p:TargetArchitecture=$__BuildArch

local exit_code="$?"
if [[ "$exit_code" != 0 ]]; then
Expand Down
31 changes: 12 additions & 19 deletions src/coreclr/dir.common.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,18 @@

<!-- Set default Configuration and Platform -->
<PropertyGroup>
<BuildArch>$(__BuildArch)</BuildArch>
<BuildArch Condition="'$(BuildArch)' == ''">$(TargetArchitecture)</BuildArch>
<BuildArch Condition="'$(BuildArch)'==''">x64</BuildArch>
<BuildArch Condition="'$(BuildArch)' == 'amd64'">x64</BuildArch>
<!-- TODO: Cleanup use of __BuildArch and __BuildType in the CI scripts -->
<TargetArchitecture Condition="'$(TargetArchitecture)' == ''">$(__BuildArch)</TargetArchitecture>
<Configuration Condition="'$(Configuration)'==''">$(__BuildType)</Configuration>

<BuildType>$(__BuildType)</BuildType>
<BuildType Condition="'$(BuildType)'==''">Debug</BuildType>
<BuildType Condition="'$(BuildType)' == 'debug'">Debug</BuildType>
<BuildType Condition="'$(BuildType)' == 'release'">Release</BuildType>
<BuildType Condition="'$(BuildType)' == 'checked'">Checked</BuildType>
<Configuration Condition="'$(Configuration)'==''">Debug</Configuration>
<Configuration Condition="'$(Configuration)' == 'debug'">Debug</Configuration>
<Configuration Condition="'$(Configuration)' == 'release'">Release</Configuration>
<Configuration Condition="'$(Configuration)' == 'checked'">Checked</Configuration>

<!-- TODO: converge on one property for TargetOS and __TargetOS (and similar), and remove these extra lines. -->
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the TODO that made me to do this.

<__TargetOS>$(TargetOS)</__TargetOS>
<__BuildArch>$(BuildArch)</__BuildArch>
<Platform Condition="'$(Platform)' == ''">$(TargetArchitecture)</Platform>

<Configuration Condition="'$(Configuration)' == ''">$(BuildType)</Configuration>
<Platform Condition="'$(Platform)' == ''">$(BuildArch)</Platform>

<PlatformConfigPathPart>$(TargetOS).$(BuildArch).$(BuildType)</PlatformConfigPathPart>
<PlatformConfigPathPart>$(TargetOS).$(TargetArchitecture).$(Configuration)</PlatformConfigPathPart>
</PropertyGroup>

<!-- Common properties -->
Expand Down Expand Up @@ -69,9 +62,9 @@
<DistroRid Condition="'$(TargetsLinux)' == 'true'">$(__DistroRid)</DistroRid>

<!-- Folder for cross target components -->
<CrossTargetComponentFolder Condition="'$(BuildArch)' == 'arm64'">x64</CrossTargetComponentFolder>
<CrossTargetComponentFolder Condition="'$(BuildArch)' == 'arm' and '$(TargetsWindows)' == 'true'">x86</CrossTargetComponentFolder>
<CrossTargetComponentFolder Condition="'$(BuildArch)' == 'arm' and '$(TargetsLinux)' == 'true'">x64</CrossTargetComponentFolder>
<CrossTargetComponentFolder Condition="'$(TargetArchitecture)' == 'arm64'">x64</CrossTargetComponentFolder>
<CrossTargetComponentFolder Condition="'$(TargetArchitecture)' == 'arm' and '$(TargetsWindows)' == 'true'">x86</CrossTargetComponentFolder>
<CrossTargetComponentFolder Condition="'$(TargetArchitecture)' == 'arm' and '$(TargetsLinux)' == 'true'">x64</CrossTargetComponentFolder>
</PropertyGroup>

<!-- Set the kind of PDB to Portable -->
Expand Down
5 changes: 2 additions & 3 deletions src/coreclr/src/.nuget/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@

<!-- Distro rid is passed as runtimeos-arch-->
<_parseDistroRid>$(__DistroRid)</_parseDistroRid>
<_parseDistroRid Condition="'$(_parseDistroRid)' == '' and '$(__TargetOS)' == '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>
<OSRid Condition="'$(OSRid)' == ''">win10</OSRid>

<TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_archRidIndex)' != '0'">$(_parseDistroRid.SubString($(_archRidIndex)))</TargetArchitecture>
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(Platform)' != ''">$(Platform)</TargetArchitecture>
<TargetArchitecture Condition="'$(TargetArchitecture)' == ''">$(BuildArch)</TargetArchitecture>

<RuntimeOS Condition="'$(RuntimeOS)' == ''">$(OSRid)</RuntimeOS>

Expand All @@ -46,7 +45,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 '$(__TargetOS)' != ''">$(__TargetOS)</_derivedPackageTargetOSGroup>
<_derivedPackageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == '' and '$(TargetOS)' != ''">$(TargetOS)</_derivedPackageTargetOSGroup>
<_derivedPackageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == ''">Linux</_derivedPackageTargetOSGroup>

<_isSupportedOSGroup Condition="!$(SupportedPackageOSGroups.Contains(';$(_derivedPackageTargetOSGroup);'))">false</_isSupportedOSGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/src/.nuget/builds.targets
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<BuildingAnOfficialBuildLeg Condition="'$(OfficialBuildId)' != '' AND '$(DotNetBuildFromSource)' != 'true'">true</BuildingAnOfficialBuildLeg>

<!-- During an official build, only build identity packages on windows x64 legs -->
<BuildIdentityPackage Condition="'$(BuildingAnOfficialBuildLeg)' == 'true' AND ('$(OS)' != 'Windows_NT' OR '$(BuildArch)' != 'x64')">false</BuildIdentityPackage>
<BuildIdentityPackage Condition="'$(BuildingAnOfficialBuildLeg)' == 'true' AND ('$(OS)' != 'Windows_NT' OR '$(TargetArchitecture)' != 'x64')">false</BuildIdentityPackage>
</PropertyGroup>

<Target Name="FilterProjects" BeforeTargets="Build">
Expand Down
Loading