Skip to content

Commit 0b228a7

Browse files
committed
SourceBuild.props: derive RuntimeOS from NETCoreSdkRuntimeIdentifier.
1 parent 502c373 commit 0b228a7

File tree

3 files changed

+7
-13
lines changed

3 files changed

+7
-13
lines changed

eng/SourceBuild.props

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@
1515
<TargetRid Condition="'$(TargetRid)' == '' and '$(SourceBuildNonPortable)' == 'true'">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</TargetRid>
1616
<TargetRid Condition="'$(TargetRid)' == ''">$(__DistroRid)</TargetRid>
1717

18-
<!-- Split e.g. 'fedora.33-x64' into 'fedora.33' and 'x64'. -->
18+
<_sdkRuntimeIdentifierPlatformIndex>$(NETCoreSdkRuntimeIdentifier.LastIndexOf('-'))</_sdkRuntimeIdentifierPlatformIndex>
19+
<BootstrapOS Condition="'$(BootstrapOS)' == ''">$(NETCoreSdkRuntimeIdentifier.Substring(0, $(_sdkRuntimeIdentifierPlatformIndex)))</BootstrapOS>
20+
1921
<_targetRidPlatformIndex>$(TargetRid.LastIndexOf('-'))</_targetRidPlatformIndex>
20-
<RuntimeOS>$(TargetRid.Substring(0, $(_targetRidPlatformIndex)))</RuntimeOS>
2122
<TargetArch>$(TargetRid.Substring($(_targetRidPlatformIndex)).TrimStart('-'))</TargetArch>
2223

23-
<!-- BaseRidOS is an expected known rid in the graph that TargetRid is compatible with. -->
24-
<BaseRidOS Condition="'$(BaseRidOS)' == ''">linux</BaseRidOS>
24+
<!-- BaseOS is an expected known rid in the graph that TargetRid is compatible with. -->
25+
<BaseOS Condition="'$(BaseOS)' == ''">$(BootstrapOS)</BaseOS>
2526

2627
<LogVerbosity Condition="'$(LogVerbosity)' == ''">minimal</LogVerbosity>
2728
</PropertyGroup>
@@ -39,12 +40,12 @@
3940
<InnerBuildArgs>$(InnerBuildArgs) --portablebuild $(SourceBuildPortable)</InnerBuildArgs>
4041
<InnerBuildArgs>$(InnerBuildArgs) /p:NoPgoOptimize=true</InnerBuildArgs>
4142
<InnerBuildArgs>$(InnerBuildArgs) /p:KeepNativeSymbols=true</InnerBuildArgs>
42-
<InnerBuildArgs>$(InnerBuildArgs) /p:RuntimeOS=$(RuntimeOS)</InnerBuildArgs>
43+
<InnerBuildArgs>$(InnerBuildArgs) /p:RuntimeOS=$(BootstrapOS)</InnerBuildArgs>
4344
<InnerBuildArgs Condition="'$(OfficialBuildId)' != ''">$(InnerBuildArgs) /p:OfficialBuildId=$(OfficialBuildId)</InnerBuildArgs>
4445
<InnerBuildArgs Condition="'$(ContinuousIntegrationBuild)' != ''">$(InnerBuildArgs) /p:ContinuousIntegrationBuild=$(ContinuousIntegrationBuild)</InnerBuildArgs>
4546
<InnerBuildArgs>$(InnerBuildArgs) /p:BuildDebPackage=false</InnerBuildArgs>
4647
<InnerBuildArgs>$(InnerBuildArgs) /p:EnableNgenOptimization=false</InnerBuildArgs>
47-
<InnerBuildArgs>$(InnerBuildArgs) /p:AdditionalRuntimeIdentifierParent=$(BaseRidOS)</InnerBuildArgs>
48+
<InnerBuildArgs>$(InnerBuildArgs) /p:AdditionalRuntimeIdentifierParent=$(BaseOS)</InnerBuildArgs>
4849
</PropertyGroup>
4950
</Target>
5051

eng/common/templates/steps/source-build.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,6 @@ steps:
6363
targetRidArgs='/p:TargetRid=${{ parameters.platform.targetRID }}'
6464
fi
6565
66-
runtimeOsArgs=
67-
if [ '${{ parameters.platform.runtimeOS }}' != '' ]; then
68-
runtimeOsArgs='/p:RuntimeOS=${{ parameters.platform.runtimeOS }}'
69-
fi
70-
7166
publishArgs=
7267
if [ '${{ parameters.platform.skipPublishValidation }}' != 'true' ]; then
7368
publishArgs='--publish'
@@ -80,7 +75,6 @@ steps:
8075
$internalRuntimeDownloadArgs \
8176
$internalRestoreArgs \
8277
$targetRidArgs \
83-
$runtimeOsArgs \
8478
/p:SourceBuildNonPortable=${{ parameters.platform.nonPortable }} \
8579
/p:ArcadeBuildFromSource=true
8680
displayName: Build

eng/pipelines/common/global-build-job.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ jobs:
142142
buildScript: $(_sclEnableCommand) $(Build.SourcesDirectory)$(dir)build$(scriptExt)
143143
nonPortable: true
144144
targetRID: banana.24-x64
145-
runtimeOS: linux
146145

147146
- ${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS', 'MacCatalyst') }}:
148147
- script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh ${{ parameters.osGroup }} ${{ parameters.archType }} azDO

0 commit comments

Comments
 (0)