Skip to content

Commit 887c043

Browse files
sbomerjanvorliam11jkoritzinskyakoeplinger
authored
Build on CBL-mariner host with rootfs (#84148)
This changes the linux builds to use the new CBL-mariner build images. All of these builds are now cross-builds with a rootfs (including x64, and x64 musl). - The new images intentionally don't have binutils, so our build jobs have been updated to use llvm-based tools. This includes lld when we run nativeaot over our tests. This leads to a slight size regression, I believe due to ILCompiler not supporting `--gc-sections` with lld. - This change turns off PGO optimization because it was hitting a compiler crash when consuming and old version of profile data produced by clang9 instrumented builds (https://bugzilla.redhat.com/show_bug.cgi?id=1827282). The intention is to quickly flow the change into our optimization repo, then collect and ingest the new data so we can turn optimization back on. - The Mono LLVMAot test build is kept on the old build images, because they run the aot compiler which depends on binutils. We can probably move it to the same plan as the other legs, but I'm not familiar with the context here. cc @akoeplinger. We would at least need to fix `AS_NAME` here: https://github.com/dotnet/runtime/blob/1d2cd206f40306cbf06f3e2676e7cfa301077285/src/mono/mono/mini/aot-compiler.c#L13030 - Mono arm64 product build is kept on the old images due to #84503. - Includes a temporary revert of d80a584 which requires LLVM 13. - Sets arch for mono build, because our source-built LLVM doesn't target armv7a by default. Possibly related to https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/commit/b7363248b115339c4fb838fcd3ae43671eedae0a - Allow text relocations. The lld defaults differ from ld, which will add text relocations on demand by default. See https://maskray.me/blog/2020-12-19-lld-and-gnu-linker-incompatibilities --------- Co-authored-by: Jan Vorlicek <[email protected]> Co-authored-by: Adeel Mujahid <[email protected]> Co-authored-by: Jeremy Koritzinsky <[email protected]> Co-authored-by: Alexander Köplinger <[email protected]>
1 parent 3be7ac1 commit 887c043

40 files changed

+281
-115
lines changed

eng/Subsets.props

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,8 @@
249249
Category="clr" />
250250
</ItemGroup>
251251

252-
<!-- Build the CoreCLR cross-arch tools when we're doing a cross-architecture build and either we're building any CoreCLR native tools for platforms CoreCLR fully supports or when someone explicitly requests them -->
253-
<ItemGroup Condition="(('$(ClrRuntimeBuildSubsets)' != '' and '$(PrimaryRuntimeFlavor)' == 'CoreCLR' and '$(TargetsMobile)' != 'true') or $(_subset.Contains('+clr.crossarchtools+'))) and '$(BuildArchitecture)' != '$(TargetArchitecture)'">
252+
<!-- Build the CoreCLR cross tools when we're doing a cross build and either we're building any CoreCLR native tools for platforms CoreCLR fully supports or when someone explicitly requests them -->
253+
<ItemGroup Condition="(('$(ClrRuntimeBuildSubsets)' != '' and '$(PrimaryRuntimeFlavor)' == 'CoreCLR' and '$(TargetsMobile)' != 'true') or $(_subset.Contains('+clr.crossarchtools+'))) and ('$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)')">
254254
<ProjectToBuild
255255
Include="$(CoreClrProjectRoot)runtime.proj"
256256
AdditionalProperties="%(AdditionalProperties);
@@ -325,7 +325,7 @@
325325
<ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\ILCompiler\ILCompiler.csproj" Category="clr" Condition="'$(NativeAotSupported)' == 'true'" />
326326
<ProjectToBuild Include="$(CoreClrProjectRoot)nativeaot\BuildIntegration\BuildIntegration.proj" Category="clr" Condition="'$(NativeAotSupported)' == 'true'" />
327327

328-
<ProjectToBuild Condition="'$(NativeAotSupported)' == 'true' and '$(TargetArchitecture)' != '$(BuildArchitecture)'" Include="$(CoreClrProjectRoot)tools\aot\ILCompiler\ILCompiler_crossarch.csproj" Category="clr" />
328+
<ProjectToBuild Condition="'$(NativeAotSupported)' == 'true' and ('$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)')" Include="$(CoreClrProjectRoot)tools\aot\ILCompiler\ILCompiler_crossarch.csproj" Category="clr" />
329329
<ProjectToBuild Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)'" Include="$(CoreClrProjectRoot)tools\aot\crossgen2\crossgen2_crossarch.csproj" Category="clr" />
330330

331331
<ProjectToBuild Condition="'$(TargetOS)' == 'windows' or ('$(TargetOS)' == 'linux' and ('$(TargetArchitecture)' == 'x64' or '$(TargetArchitecture)' == 'arm64')) or '$(TargetOS)' == 'osx'" Include="$(CoreClrProjectRoot)tools\SuperFileCheck\SuperFileCheck.csproj" Category="clr" />
@@ -367,8 +367,8 @@
367367

368368
<ItemGroup Condition="$(_subset.Contains('+clr.nativecorelib+'))">
369369
<!-- Build crossgen2 that will be used to compile System.Private.CoreLib library for CoreCLR -->
370-
<ProjectToBuild Condition="'$(TargetArchitecture)' != 'x64' and '$(BuildArchitecture)' == 'x64'" Include="$(CoreClrProjectRoot)tools\aot\crossgen2\crossgen2_crossarch.csproj" Category="clr" />
371-
<ProjectToBuild Condition="!('$(TargetArchitecture)' != 'x64' and '$(BuildArchitecture)' == 'x64')" Include="$(CoreClrProjectRoot)tools\aot\crossgen2\crossgen2.csproj" Category="clr" />
370+
<ProjectToBuild Condition="('$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)') and '$(BuildArchitecture)' == 'x64'" Include="$(CoreClrProjectRoot)tools\aot\crossgen2\crossgen2_crossarch.csproj" Category="clr" />
371+
<ProjectToBuild Condition="!(('$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)') and '$(BuildArchitecture)' == 'x64')" Include="$(CoreClrProjectRoot)tools\aot\crossgen2\crossgen2.csproj" Category="clr" />
372372
<ProjectToBuild Include="$(CoreClrProjectRoot)crossgen-corelib.proj" Category="clr" />
373373
</ItemGroup>
374374

eng/common/cross/toolchain.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ elseif(TARGET_ARCH_NAME STREQUAL "s390x")
7676
set(TOOLCHAIN "s390x-linux-gnu")
7777
elseif(TARGET_ARCH_NAME STREQUAL "x64")
7878
set(CMAKE_SYSTEM_PROCESSOR x86_64)
79-
if(LINUX)
79+
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/x86_64-alpine-linux-musl)
80+
set(TOOLCHAIN "x86_64-alpine-linux-musl")
81+
elseif(LINUX)
8082
set(TOOLCHAIN "x86_64-linux-gnu")
8183
if(TIZEN)
8284
set(TIZEN_TOOLCHAIN "x86_64-tizen-linux-gnu/9.2.0")
@@ -279,7 +281,7 @@ endif()
279281

280282
# Specify compile options
281283

282-
if((TARGET_ARCH_NAME MATCHES "^(arm|arm64|armel|armv6|ppc64le|riscv64|s390x)$" AND NOT ANDROID AND NOT FREEBSD) OR ILLUMOS OR HAIKU)
284+
if((TARGET_ARCH_NAME MATCHES "^(arm|arm64|armel|armv6|ppc64le|riscv64|s390x|x64|x86)$" AND NOT ANDROID AND NOT FREEBSD) OR ILLUMOS OR HAIKU)
283285
set(CMAKE_C_COMPILER_TARGET ${TOOLCHAIN})
284286
set(CMAKE_CXX_COMPILER_TARGET ${TOOLCHAIN})
285287
set(CMAKE_ASM_COMPILER_TARGET ${TOOLCHAIN})

eng/liveBuilds.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<CoreCLRSharedFrameworkDir>$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'sharedFramework'))</CoreCLRSharedFrameworkDir>
2626
<CoreCLRCrossgen2Dir>$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'crossgen2'))</CoreCLRCrossgen2Dir>
2727
<CoreCLRILCompilerDir>$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'ilc-published'))</CoreCLRILCompilerDir>
28-
<CoreCLRCrossILCompilerDir Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)'">$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', '$(BuildArchitecture)', 'ilc'))</CoreCLRCrossILCompilerDir>
28+
<CoreCLRCrossILCompilerDir Condition="'$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)'">$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', '$(BuildArchitecture)', 'ilc'))</CoreCLRCrossILCompilerDir>
2929
<CoreCLRAotSdkDir>$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'aotsdk'))</CoreCLRAotSdkDir>
3030
<CoreCLRBuildIntegrationDir>$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'build'))</CoreCLRBuildIntegrationDir>
3131

eng/native/build-commons.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,7 @@ while :; do
473473
hostarch|-hostarch)
474474
if [[ -n "$2" ]]; then
475475
__HostArch="$2"
476+
__ExplicitHostArch=1
476477
shift
477478
else
478479
echo "ERROR: 'hostarch' requires a non-empty option argument"

eng/native/tryrun.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv7-alpine-linux-musleabihf OR
1212
EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/s390x-alpine-linux-musl OR
1313
EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/ppc64le-alpine-linux-musl OR
1414
EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl OR
15+
EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/x86_64-alpine-linux-musl OR
1516
EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/riscv64-alpine-linux-musl)
1617

1718
set(ALPINE_LINUX 1)
@@ -74,7 +75,7 @@ if(DARWIN)
7475
else()
7576
message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only arm64 or x64 is supported for OSX cross build!")
7677
endif()
77-
elseif(TARGET_ARCH_NAME MATCHES "^(armel|arm|armv6|arm64|loongarch64|riscv64|s390x|ppc64le|x86)$" OR FREEBSD OR ILLUMOS OR TIZEN)
78+
elseif(TARGET_ARCH_NAME MATCHES "^(armel|arm|armv6|arm64|loongarch64|riscv64|s390x|ppc64le|x86|x64)$" OR FREEBSD OR ILLUMOS OR TIZEN)
7879
set_cache_value(FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL_EXITCODE 1)
7980
set_cache_value(GETPWUID_R_SETS_ERRNO_EXITCODE 0)
8081
set_cache_value(HAS_POSIX_SEMAPHORES_EXITCODE 0)
@@ -160,6 +161,6 @@ else()
160161
message(FATAL_ERROR "Unsupported platform. OS: ${CMAKE_SYSTEM_NAME}, arch: ${TARGET_ARCH_NAME}")
161162
endif()
162163

163-
if(TARGET_ARCH_NAME MATCHES "^(x86|s390x|armv6|loongarch64|riscv64|ppc64le)$")
164+
if(TARGET_ARCH_NAME MATCHES "^(x86|x64|s390x|armv6|loongarch64|riscv64|ppc64le)$")
164165
set_cache_value(HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES_EXITCODE 0)
165166
endif()

eng/nativepgo.targets

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<Project>
22
<PropertyGroup>
33
<NativeOptimizationDataSupported Condition="'$(TargetOS)' == 'windows' And ('$(TargetArchitecture)' == 'x64' Or '$(TargetArchitecture)' == 'x86' Or '$(TargetArchitecture)' == 'arm64')">true</NativeOptimizationDataSupported>
4-
<NativeOptimizationDataSupported Condition="'$(TargetOS)' == 'linux' And ('$(TargetArchitecture)' == 'x64' Or '$(TargetArchitecture)' == 'arm64')">true</NativeOptimizationDataSupported>
4+
<!-- Disable PGO until we get profile data collected with a new clang -->
5+
<NativeOptimizationDataSupported Condition="'$(TargetOS)' == 'linux' And ('$(TargetArchitecture)' == 'x64' Or '$(TargetArchitecture)' == 'arm64')">false</NativeOptimizationDataSupported>
56
<NativeOptimizationDataSupported Condition="'$(NoPgoOptimize)' == 'true'">false</NativeOptimizationDataSupported>
67
<NativeOptimizationDataSupported Condition="'$(Configuration)' != 'Release'">false</NativeOptimizationDataSupported>
78

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,11 @@ jobs:
7575
- name: _osParameter
7676
value: /p:RuntimeOS=linux-bionic
7777

78-
# Do not rename as it clashes with MSBuild property in libraries/build-native.proj
79-
- name: _crossBuildPropertyArg
80-
value: /p:CrossBuild=${{ parameters.crossBuild }}
78+
- name: crossArg
79+
value: ''
80+
- ${{ if eq(parameters.crossBuild, true) }}:
81+
- name: crossArg
82+
value: '-cross'
8183

8284
- ${{ if ne(parameters.jobParameters.crossrootfsDir, '') }}:
8385
# This is only required for cross builds.
@@ -187,7 +189,7 @@ jobs:
187189
- task: CodeQL3000Init@0
188190
displayName: Initialize CodeQL (manually-injected)
189191

190-
- script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) ${{ parameters.buildArgs }} $(_officialBuildParameter) $(_crossBuildPropertyArg) $(_cxx11Parameter) $(_buildDarwinFrameworksParameter) $(_overrideTestScriptWindowsCmdParameter)
192+
- script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) $(crossArg) ${{ parameters.buildArgs }} $(_officialBuildParameter) $(_cxx11Parameter) $(_buildDarwinFrameworksParameter) $(_overrideTestScriptWindowsCmdParameter)
191193
displayName: Build product
192194
${{ if eq(parameters.useContinueOnErrorDuringBuild, true) }}:
193195
continueOnError: ${{ parameters.shouldContinueOnError }}

eng/pipelines/common/platform-matrix.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ jobs:
108108
runtimeFlavor: ${{ parameters.runtimeFlavor }}
109109
buildConfig: ${{ parameters.buildConfig }}
110110
helixQueueGroup: ${{ parameters.helixQueueGroup }}
111+
crossBuild: true
111112
${{ insert }}: ${{ parameters.jobParameters }}
112113

113114
# Linux musl arm
@@ -222,6 +223,7 @@ jobs:
222223
runtimeFlavor: ${{ parameters.runtimeFlavor }}
223224
buildConfig: ${{ parameters.buildConfig }}
224225
helixQueueGroup: ${{ parameters.helixQueueGroup }}
226+
crossBuild: true
225227
${{ insert }}: ${{ parameters.jobParameters }}
226228

227229
# Linux x86
@@ -316,6 +318,68 @@ jobs:
316318
isNonPortableSourceBuild: false
317319
${{ insert }}: ${{ parameters.jobParameters }}
318320

321+
# GCC Linux x64 Build
322+
323+
- ${{ if containsValue(parameters.platforms, 'gcc_linux_x64') }}:
324+
- template: xplat-setup.yml
325+
parameters:
326+
jobTemplate: ${{ parameters.jobTemplate }}
327+
helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
328+
variables: ${{ parameters.variables }}
329+
osGroup: linux
330+
archType: x64
331+
targetRid: linux-x64
332+
platform: linux_x64
333+
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
334+
container: debian-11-gcc12-amd64
335+
jobParameters:
336+
runtimeFlavor: ${{ parameters.runtimeFlavor }}
337+
buildConfig: ${{ parameters.buildConfig }}
338+
helixQueueGroup: ${{ parameters.helixQueueGroup }}
339+
compilerName: gcc
340+
${{ insert }}: ${{ parameters.jobParameters }}
341+
342+
# Mono Linux arm64 product build
343+
344+
- ${{ if containsValue(parameters.platforms, 'mono_linux_arm64') }}:
345+
- template: xplat-setup.yml
346+
parameters:
347+
jobTemplate: ${{ parameters.jobTemplate }}
348+
helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
349+
variables: ${{ parameters.variables }}
350+
osGroup: linux
351+
archType: arm64
352+
targetRid: linux-arm64
353+
platform: linux_arm64
354+
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
355+
container: mono_linux_arm64
356+
jobParameters:
357+
runtimeFlavor: ${{ parameters.runtimeFlavor }}
358+
buildConfig: ${{ parameters.buildConfig }}
359+
helixQueueGroup: ${{ parameters.helixQueueGroup }}
360+
crossBuild: true
361+
${{ insert }}: ${{ parameters.jobParameters }}
362+
363+
# Mono LLVMAot test build
364+
365+
- ${{ if containsValue(parameters.platforms, 'linux_x64_llvmaot') }}:
366+
- template: xplat-setup.yml
367+
parameters:
368+
jobTemplate: ${{ parameters.jobTemplate }}
369+
helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
370+
variables: ${{ parameters.variables }}
371+
osGroup: linux
372+
archType: x64
373+
targetRid: linux-x64
374+
platform: linux_x64
375+
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
376+
container: linux_x64_llvmaot
377+
jobParameters:
378+
runtimeFlavor: ${{ parameters.runtimeFlavor }}
379+
buildConfig: ${{ parameters.buildConfig }}
380+
helixQueueGroup: ${{ parameters.helixQueueGroup }}
381+
${{ insert }}: ${{ parameters.jobParameters }}
382+
319383
# Linux s390x
320384

321385
- ${{ if containsValue(parameters.platforms, 'linux_s390x') }}:

eng/pipelines/common/templates/pipeline-with-resources.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ parameters:
55
resources:
66
containers:
77
- container: linux_arm
8-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-arm
8+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm-20230410173854-290f679
99
env:
1010
ROOTFS_DIR: /crossrootfs/arm
1111

@@ -14,21 +14,29 @@ resources:
1414
env:
1515
ROOTFS_DIR: /crossrootfs/armv6
1616

17-
- container: linux_arm64
17+
# Use old build images until we can avoid a clang-12 crash: https://github.com/dotnet/runtime/issues/84503
18+
- container: mono_linux_arm64
1819
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04-cross-arm64
1920
env:
2021
ROOTFS_DIR: /crossrootfs/arm64
2122

23+
- container: linux_arm64
24+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm64-20230410173854-2288685
25+
env:
26+
ROOTFS_DIR: /crossrootfs/arm64
27+
2228
- container: linux_musl_x64
23-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.13-WithNode
29+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-amd64-alpine-20230410173854-2288685
30+
env:
31+
ROOTFS_DIR: /crossrootfs/x64
2432

2533
- container: linux_musl_arm
26-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-cross-arm-alpine
34+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm-alpine-20230410173854-290f679
2735
env:
2836
ROOTFS_DIR: /crossrootfs/arm
2937

3038
- container: linux_musl_arm64
31-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-cross-arm64-alpine
39+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm64-alpine-20230410173854-2288685
3240
env:
3341
ROOTFS_DIR: /crossrootfs/arm64
3442
# This container contains all required toolsets to build for Android and for Linux with bionic libc.
@@ -37,10 +45,12 @@ resources:
3745
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-android
3846

3947
- container: linux_x64
40-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7
48+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-amd64-20230410173854-2288685
49+
env:
50+
ROOTFS_DIR: /crossrootfs/x64
4151

4252
- container: linux_x86
43-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-x86-linux
53+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-x86-20230410173854-2288685
4454
env:
4555
ROOTFS_DIR: /crossrootfs/x86
4656

@@ -59,6 +69,12 @@ resources:
5969
env:
6070
ROOTFS_DIR: /crossrootfs/ppc64le
6171

72+
- container: debian-11-gcc12-amd64
73+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-gcc12-amd64
74+
75+
- container: linux_x64_llvmaot
76+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7
77+
6278
- container: browser_wasm
6379
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-webassembly-net8-20230322221728-80fdceb
6480

eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ steps:
3333
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) ci ${{ parameters.archType }} $(buildConfigUpper) $(priorityArg) $(runtimeFlavorArgs) ${{ parameters.testBuildArgs }} $(runtimeVariantArg) /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }}
3434
displayName: Build Tests
3535
- ${{ if ne(parameters.osGroup, 'windows') }}:
36-
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) ci os ${{ parameters.osGroup }} ${{ parameters.archType }} $(buildConfigUpper) $(priorityArg) $(runtimeFlavorArgs) ${{ parameters.testBuildArgs }} $(runtimeVariantArg) /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }}
36+
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(crossArg) ci os ${{ parameters.osGroup }} ${{ parameters.archType }} $(buildConfigUpper) $(priorityArg) $(runtimeFlavorArgs) ${{ parameters.testBuildArgs }} $(runtimeVariantArg) /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }}
3737
displayName: Build Tests
3838

3939

eng/pipelines/common/templates/runtimes/build-test-job.yml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ parameters:
1313
runtimeVariant: ''
1414
dependsOn: []
1515
dependOnEvaluatePaths: false
16+
crossBuild: false
1617
pgoType: ''
1718

1819
### Build managed test components (native components are getting built as part
@@ -31,16 +32,13 @@ jobs:
3132
archType: ${{ parameters.archType }}
3233
osGroup: ${{ parameters.osGroup }}
3334
osSubgroup: ${{ parameters.osSubgroup }}
35+
crossBuild: ${{ parameters.crossBuild }}
3436
container: ${{ parameters.container }}
3537
runtimeVariant: ${{ parameters.runtimeVariant }}
3638
testGroup: ${{ parameters.testGroup }}
3739
pool: ${{ parameters.pool }}
3840
dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }}
39-
40-
${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc'), not(and(eq(parameters.osGroup, 'linux'), eq(parameters.osSubgroup, '_musl'))), not(eq(parameters.osGroup, 'osx'))) }}:
41-
compilerArg: '-clang9'
42-
${{ if not(and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc'), not(and(eq(parameters.osGroup, 'linux'), eq(parameters.osSubgroup, '_musl'))), not(eq(parameters.osGroup, 'osx')))) }}:
43-
compilerArg: ''
41+
compilerArg: ''
4442

4543
# Test jobs should continue on error for internal builds
4644
${{ if eq(variables['System.TeamProject'], 'internal') }}:
@@ -74,17 +72,6 @@ jobs:
7472
value: 'libs.sfx+libs.oob+clr.iltools /p:RefOnly=true -c Release -ci'
7573
- name: compilerArg
7674
value: ''
77-
- ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc')) }}:
78-
- name: compilerArg
79-
value: '-clang9'
80-
# We need to use the stable version available on Alpine Linux
81-
- ${{ if and(eq(parameters.osGroup, 'linux'), eq(parameters.osSubgroup, '_musl')) }}:
82-
- name: compilerArg
83-
value: ''
84-
# AppleClang has different version scheme, so we let compiler introspection pick up the available clang from PATH
85-
- ${{ if eq(parameters.osGroup, 'osx') }}:
86-
- name: compilerArg
87-
value: ''
8875

8976
- name: runtimeFlavorArgs
9077
value: ''
@@ -109,7 +96,7 @@ jobs:
10996
displayName: Install native dependencies
11097

11198
# Build core/libraries dependencies of test build
112-
- script: $(Build.SourcesDirectory)/build$(scriptExt) $(liveRuntimeBuildParams) $(compilerArg)
99+
- script: $(Build.SourcesDirectory)/build$(scriptExt) $(liveRuntimeBuildParams) $(crossArg) $(compilerArg)
113100
displayName: Build coreclr/libs components needed by test build
114101

115102
- ${{ if in(parameters.osGroup, 'osx', 'ios', 'tvos') }}:

0 commit comments

Comments
 (0)