Skip to content

Commit dd716e4

Browse files
authored
Eliminate SourceBuildNonPortable switch (#15245)
1 parent 48003be commit dd716e4

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

Documentation/UnifiedBuild/Unified-Build-Controls.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ In addition to these default high level controls, there may be additional compon
158158
| ShortStack | "true", "false", "" | "" | If true, the build is a 'short stack' (runtime and its dependencies only). Other repo builds are skipped. |
159159
| ExcludeFromDotNetBuild | "true", "false", "" | "" | When "true" and `DotNetBuild` == "true", the project is not built.<br/>This is equivalent to `ExcludeFromBuild` being set to true when `DotNetBuild` == "true".<br/>This control applies to project properties. |
160160
| ExcludeFromSourceOnlyBuild | "true", "false", "" | "" | When "true" and `DotNetBuild` == "true" and `DotNetBuildSourceOnly` == "true" the project is not built.<br/>This is equivalent to `ExcludeFromBuild` being set to true when `DotNetBuild` == "true". Same as `ExcludeFromSourceBuild` today.<br/>This control applies to project properties. |
161+
| PortableBuild | "true", "false", "" | "" | When "false", the build is non-portable. |
161162

162163
### Organizational Controls
163164

eng/common/core-templates/job/source-build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ parameters:
1212
# The name of the job. This is included in the job ID.
1313
# targetRID: ''
1414
# The name of the target RID to use, instead of the one auto-detected by Arcade.
15-
# nonPortable: false
15+
# portableBuild: false
1616
# Enables non-portable mode. This means a more specific RID (e.g. fedora.32-x64 rather than
17-
# linux-x64), and compiling against distro-provided packages rather than portable ones.
17+
# linux-x64), and compiling against distro-provided packages rather than portable ones. The
18+
# default is portable mode.
1819
# skipPublishValidation: false
1920
# Disables publishing validation. By default, a check is performed to ensure no packages are
2021
# published by source-build.

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ steps:
7676
assetManifestFileName=SourceBuild_${{ parameters.platform.name }}.xml
7777
fi
7878
79+
portableBuildArgs=
80+
if [ '${{ parameters.platform.portableBuild }}' != '' ]; then
81+
portableBuildArgs='/p:PortabelBuild=${{ parameters.platform.portableBuild }}'
82+
fi
83+
7984
${{ coalesce(parameters.platform.buildScript, './build.sh') }} --ci \
8085
--configuration $buildConfig \
8186
--restore --build --pack $publishArgs -bl \
@@ -85,7 +90,7 @@ steps:
8590
$targetRidArgs \
8691
$runtimeOsArgs \
8792
$baseOsArgs \
88-
/p:SourceBuildNonPortable=${{ parameters.platform.nonPortable }} \
93+
$portableBuildArgs \
8994
/p:DotNetBuildSourceOnly=true \
9095
/p:DotNetBuildRepo=true \
9196
/p:AssetManifestFileName=$assetManifestFileName

src/Microsoft.DotNet.Arcade.Sdk/tools/SourceBuild/SourceBuildArcade.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585

8686
<PortableRid>$(SourceBuildTargetPortableOSPlatform)-$(SourceBuildTargetArchitecture)</PortableRid>
8787

88-
<TargetRid Condition="'$(SourceBuildNonPortable)' == 'true' and '$(TargetRid)' == ''">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</TargetRid>
88+
<TargetRid Condition="'$(PortableBuild)' == 'false' and '$(TargetRid)' == ''">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</TargetRid>
8989
<!-- Default to building for the portable OS platform with host machine architecture. -->
9090
<TargetRid Condition="'$(TargetRid)' == ''">$(PortableRid)</TargetRid>
9191

0 commit comments

Comments
 (0)