Skip to content

Commit 48ef094

Browse files
committed
Add source build ci leg covering system libs
1 parent 09d9e36 commit 48ef094

File tree

5 files changed

+47
-8
lines changed

5 files changed

+47
-8
lines changed

build.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ echo " --binaryLog Create MSBuild binary log (short: -b
1717
echo " --arch, --target-arch <value> Target architecture: e.g. x64, x86, arm64, arm, riscv64"
1818
echo " --branding <preview|rtm|default> Specify versioning for shipping packages/assets. 'preview' will produce assets suffixed with '.final', 'rtm' will not contain a pre-release suffix. Default or unspecified will use VMR repo defaults."
1919
echo " --verbosity <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
20-
echo " --with-system-libs <libs> Use system versions of these libraries. Combine with a plus. eg brotli+libunwind+rapidjson+zlib"
20+
echo " --with-system-libs <libs> Use system versions of these libraries. Combine with a plus. 'all' will use all supported libraries. eg brotli+libunwind+rapidjson+zlib"
2121
echo ""
2222

2323
echo "Actions:"
@@ -138,7 +138,12 @@ while [[ $# > 0 ]]; do
138138
shift
139139
;;
140140
-with-system-libs)
141-
properties+=( "/p:UseSystemLibs=$2" )
141+
value="$2"
142+
if [[ "$value" != +* ]]; then
143+
# Ensure the value is prepended with a '+'
144+
value="+$value"
145+
fi
146+
properties+=( "/p:UseSystemLibs=$value" )
142147
shift
143148
;;
144149
-verbosity|-v)

eng/pipelines/templates/jobs/vmr-build.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ parameters:
6969
type: object
7070
default: ''
7171

72+
# Enables usage of the system libraries when building.
73+
- name: useSystemLibraries
74+
type: boolean
75+
default: false
76+
7277
#### SOURCE-ONLY parameters ####
7378

7479
# Instead of building the VMR directly, exports the sources into a tarball and builds from that
@@ -227,8 +232,14 @@ jobs:
227232
- name: brandingArgument
228233
value: $(commandPrefix)branding $(brandingType)
229234

235+
- name: useSystemLibrariesArgument
236+
${{ if eq(parameters.useSystemLibraries, 'true') }}:
237+
value: $(commandPrefix)with-system-libs all
238+
${{ else }}:
239+
value: ''
240+
230241
- name: baseArguments
231-
value: $(commandPrefix)ci $(cleanArgument) $(commandPrefix)prepareMachine -c ${{ parameters.configuration }} $(brandingArgument)
242+
value: $(commandPrefix)ci $(cleanArgument) $(commandPrefix)prepareMachine -c ${{ parameters.configuration }} $(brandingArgument) $(useSystemLibrariesArgument)
232243

233244
- name: baseProperties
234245
value: $(officialBuildProperties) /p:VerticalName=$(Agent.JobName)

eng/pipelines/templates/stages/source-build-and-validate.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ stages:
101101
buildFromArchive: ${{ leg.buildFromArchive }}
102102
runOnline: ${{ leg.runOnline }}
103103
useMonoRuntime: ${{ leg.useMonoRuntime }}
104+
useSystemLibraries: ${{ leg.useSystemLibraries }}
104105
withPreviousSDK: ${{ leg.withPreviousSDK }}
105106

106107
# We only want to publish SB artifacts for each distinct distro/version/arch combination

eng/pipelines/templates/stages/source-build-stages.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,17 @@ stages:
6363
enablePoison: false # 🚫
6464
runOnline: true #
6565
useMonoRuntime: false # 🚫
66+
useSystemLibraries: false # 🚫
67+
withPreviousSDK: false # 🚫
68+
69+
- buildNameFormat: '{0}_Offline_MsftSdk'
70+
distro: fedora
71+
targetArchitecture: x64
72+
buildFromArchive: true #
73+
enablePoison: false # 🚫
74+
runOnline: false # 🚫
75+
useMonoRuntime: false # 🚫
76+
useSystemLibraries: true #
6677
withPreviousSDK: false # 🚫
6778

6879
- ${{ if containsValue(parameters.verifications, 'source-build-stage2') }}:
@@ -74,6 +85,7 @@ stages:
7485
enablePoison: false # 🚫
7586
runOnline: false # 🚫
7687
useMonoRuntime: false # 🚫
88+
useSystemLibraries: false # 🚫
7789
withPreviousSDK: false # 🚫
7890
reuseBuildArtifactsFrom: '{0}_Online_MsftSdk_x64'
7991

@@ -88,6 +100,7 @@ stages:
88100
excludeOmniSharpTests: false # 🚫
89101
runOnline: false # 🚫
90102
useMonoRuntime: false # 🚫
103+
useSystemLibraries: false # 🚫
91104
withPreviousSDK: false # 🚫
92105

93106
- buildNameFormat: '{0}_Offline_PreviousSourceBuiltSdk'
@@ -97,6 +110,7 @@ stages:
97110
enablePoison: true #
98111
runOnline: false # 🚫
99112
useMonoRuntime: false # 🚫
113+
useSystemLibraries: false # 🚫
100114
withPreviousSDK: true #
101115

102116
- buildNameFormat: '{0}_Offline_MsftSdk'
@@ -106,6 +120,7 @@ stages:
106120
enablePoison: false # 🚫
107121
runOnline: false # 🚫
108122
useMonoRuntime: false # 🚫
123+
useSystemLibraries: false # 🚫
109124
withPreviousSDK: false # 🚫
110125

111126
- buildNameFormat: '{0}_Offline_MsftSdk'
@@ -115,6 +130,7 @@ stages:
115130
enablePoison: false # 🚫
116131
runOnline: false # 🚫
117132
useMonoRuntime: false # 🚫
133+
useSystemLibraries: false # 🚫
118134
withPreviousSDK: false # 🚫
119135

120136
- buildNameFormat: '{0}_Offline_MsftSdk'
@@ -124,6 +140,7 @@ stages:
124140
enablePoison: false # 🚫
125141
runOnline: false # 🚫
126142
useMonoRuntime: false # 🚫
143+
useSystemLibraries: false # 🚫
127144
withPreviousSDK: false # 🚫
128145

129146
- buildNameFormat: '{0}_Online_PreviousSourceBuiltSdk'
@@ -133,6 +150,7 @@ stages:
133150
enablePoison: false # 🚫
134151
runOnline: true #
135152
useMonoRuntime: false # 🚫
153+
useSystemLibraries: false # 🚫
136154
withPreviousSDK: true #
137155

138156
- buildNameFormat: '{0}_Mono_Offline_MsftSdk'
@@ -142,6 +160,7 @@ stages:
142160
enablePoison: false # 🚫
143161
runOnline: false # 🚫
144162
useMonoRuntime: true #
163+
useSystemLibraries: false # 🚫
145164
withPreviousSDK: false # 🚫
146165

147166
- buildNameFormat: '{0}_Offline_MsftSdk'
@@ -151,6 +170,7 @@ stages:
151170
enablePoison: false # 🚫
152171
runOnline: false # 🚫
153172
useMonoRuntime: false # 🚫
173+
useSystemLibraries: true #
154174
withPreviousSDK: false # 🚫
155175

156176
- buildNameFormat: '{0}Arm64_Offline_MsftSdk'
@@ -160,6 +180,7 @@ stages:
160180
enablePoison: false # 🚫
161181
runOnline: false # 🚫
162182
useMonoRuntime: false # 🚫
183+
useSystemLibraries: false # 🚫
163184
withPreviousSDK: false # 🚫
164185

165186
- buildNameFormat: '{0}_Offline_CurrentSourceBuiltSdk'
@@ -169,6 +190,7 @@ stages:
169190
enablePoison: false # 🚫
170191
runOnline: false # 🚫
171192
useMonoRuntime: false # 🚫
193+
useSystemLibraries: false # 🚫
172194
withPreviousSDK: false # 🚫
173195
reuseBuildArtifactsFrom: '{0}_Offline_MsftSdk_x64'
174196

@@ -179,5 +201,6 @@ stages:
179201
enablePoison: false # 🚫
180202
runOnline: false # 🚫
181203
useMonoRuntime: true #
204+
useSystemLibraries: false # 🚫
182205
withPreviousSDK: false # 🚫
183206
reuseBuildArtifactsFrom: '{0}_Mono_Offline_MsftSdk_x64'

repo-projects/runtime.proj

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,12 @@
4646
<BuildArgs Condition="'$(PgoInstrument)' == 'true'">$(BuildArgs) $(FlagParameterPrefix)pgoinstrument</BuildArgs>
4747

4848
<!-- Handle system libraries -->
49-
<UseSystemLibs Condition="'$(UseSystemLibs)' != ''">+$(UseSystemLibs)</UseSystemLibs>
50-
<BuildArgs Condition="$(UseSystemLibs.Contains('+brotli'))">$(BuildArgs) --cmakeargs -DCLR_CMAKE_USE_SYSTEM_BROTLI=true</BuildArgs>
51-
<BuildArgs Condition="$(UseSystemLibs.Contains('+libunwind'))">$(BuildArgs) --cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=true</BuildArgs>
49+
<BuildArgs Condition="$(UseSystemLibs.Contains('+brotli')) or $(UseSystemLibs.Contains('+all'))">$(BuildArgs) --cmakeargs -DCLR_CMAKE_USE_SYSTEM_BROTLI=true</BuildArgs>
50+
<BuildArgs Condition="$(UseSystemLibs.Contains('+libunwind')) or $(UseSystemLibs.Contains('+all'))">$(BuildArgs) --cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=true</BuildArgs>
5251
<!-- TODO: llvm-libunwind -->
5352
<!-- TODO: LinuxTracepoints -->
54-
<BuildArgs Condition="$(UseSystemLibs.Contains('+rapidjson'))">$(BuildArgs) --cmakeargs -DCLR_CMAKE_USE_SYSTEM_RAPIDJSON=true</BuildArgs>
55-
<BuildArgs Condition="$(UseSystemLibs.Contains('+zlib'))">$(BuildArgs) --cmakeargs -DCLR_CMAKE_USE_SYSTEM_ZLIB=true</BuildArgs>
53+
<BuildArgs Condition="$(UseSystemLibs.Contains('+rapidjson')) or $(UseSystemLibs.Contains('+all'))">$(BuildArgs) --cmakeargs -DCLR_CMAKE_USE_SYSTEM_RAPIDJSON=true</BuildArgs>
54+
<BuildArgs Condition="$(UseSystemLibs.Contains('+zlib')) or $(UseSystemLibs.Contains('+all'))">$(BuildArgs) --cmakeargs -DCLR_CMAKE_USE_SYSTEM_ZLIB=true</BuildArgs>
5655
<BuildArgs Condition="$(UseSystemLibs.Contains('-lttng'))">$(BuildArgs) /p:FeatureXplatEventSource=false</BuildArgs>
5756
</PropertyGroup>
5857

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy