Skip to content

Commit fc66eac

Browse files
authored
eng/SourceBuild.props: when unset, let the repo determine RuntimeOS. (#82546)
* eng/SourceBuild.props: when unset, let the repo determine RuntimeOS. When source-build builds runtime, it will pass RuntimeOS and BaseOS. When the repo is built directly using './build.sh --sb', let the repo determine those values rather than calculating them in SourceBuild.props. * global-build-job.yml: remove unneeded runtimeOS param.
1 parent 915ad08 commit fc66eac

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

eng/SourceBuild.props

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@
1515
<_targetRidPlatformIndex>$(TargetRid.LastIndexOf('-'))</_targetRidPlatformIndex>
1616
<TargetArch>$(TargetRid.Substring($(_targetRidPlatformIndex)).TrimStart('-'))</TargetArch>
1717

18-
<!-- RuntimeOS is the build host rid OS. -->
19-
<RuntimeOS>$(TargetRid.Substring(0, $(_targetRidPlatformIndex)))</RuntimeOS>
20-
21-
<!-- BaseOS is an expected known rid in the graph that TargetRid is compatible with.
22-
It's used to add TargetRid in the graph if the parent can't be detected. -->
23-
<BaseOS>$(RuntimeOS)</BaseOS>
24-
2518
<LogVerbosity Condition="'$(LogVerbosity)' == ''">minimal</LogVerbosity>
2619
</PropertyGroup>
2720

@@ -38,10 +31,13 @@
3831
<InnerBuildArgs>$(InnerBuildArgs) --nodereuse false</InnerBuildArgs>
3932
<InnerBuildArgs>$(InnerBuildArgs) --warnAsError false</InnerBuildArgs>
4033
<InnerBuildArgs>$(InnerBuildArgs) --outputrid $(TargetRid)</InnerBuildArgs>
34+
<!-- RuntimeOS is the build host rid OS. -->
4135
<InnerBuildArgs>$(InnerBuildArgs) /p:RuntimeOS=$(RuntimeOS)</InnerBuildArgs>
36+
<!-- BaseOS is an expected known rid in the graph that TargetRid is compatible with.
37+
It's used to add TargetRid in the graph if the parent can't be detected. -->
38+
<InnerBuildArgs>$(InnerBuildArgs) /p:AdditionalRuntimeIdentifierParent=$(BaseOS)</InnerBuildArgs>
4239
<InnerBuildArgs Condition="'$(OfficialBuildId)' != ''">$(InnerBuildArgs) /p:OfficialBuildId=$(OfficialBuildId)</InnerBuildArgs>
4340
<InnerBuildArgs Condition="'$(ContinuousIntegrationBuild)' != ''">$(InnerBuildArgs) /p:ContinuousIntegrationBuild=$(ContinuousIntegrationBuild)</InnerBuildArgs>
44-
<InnerBuildArgs>$(InnerBuildArgs) /p:AdditionalRuntimeIdentifierParent=$(BaseOS)</InnerBuildArgs>
4541
<InnerBuildArgs Condition="'$(SourceBuildUseMonoRuntime)' == 'true'">$(InnerBuildArgs) /p:PrimaryRuntimeFlavor=Mono /p:RuntimeFlavor=Mono</InnerBuildArgs>
4642
</PropertyGroup>
4743
</Target>

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ jobs:
163163
buildScript: $(Build.SourcesDirectory)$(dir)build$(scriptExt)
164164
nonPortable: ${{ parameters.isNonPortableSourceBuild }}
165165
targetRID: ${{ parameters.targetRid }}
166-
runtimeOS: linux
167166
name: ${{ parameters.platform }}
168167

169168
- ${{ if in(parameters.osGroup, 'osx', 'maccatalyst', 'ios', 'iossimulator', 'tvos', 'tvossimulator') }}:

0 commit comments

Comments
 (0)