Skip to content

Commit d08dff5

Browse files
sbomeram11
andauthored
Update to .NET 10 build images (#110198)
* Update to .NET 10 build images This updates the libc requirement to: - glibc 2.27 - musl libc 1.2.3 These images have LLVM 19. * Use musl tags, update docs * Fix arm32 build The NEON_AVAILABLE and NEON_HAS_LD4 checks in zlib-ng attempt to pass -mfpu=neon via CMAKE_REQUIRED_FLAGS, but our toolchain.cmake sets -mfpu=vfpv4 via add_compile_options, which overrides the former. Work around this by disabling neon on arm32 linux, matching .NET 9. * Use FreeBSD 14 images Co-authored-by: Adeel Mujahid <[email protected]> * Fix alpine arm32 build --------- Co-authored-by: Adeel Mujahid <[email protected]>
1 parent b382a45 commit d08dff5

File tree

8 files changed

+52
-48
lines changed

8 files changed

+52
-48
lines changed

.github/workflows/jit-format.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
os:
1616
- name: linux
1717
image: ubuntu-latest
18-
container: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-amd64
18+
container: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-amd64
1919
extension: '.sh'
2020
cross: '--cross'
2121
rootfs: '/crossrootfs/x64'

docs/project/linux-build-methodology.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ style amd64 text-align: left;
100100
style arm64 text-align: left;
101101
style x86 text-align: left;
102102
style arm text-align: left;
103-
style amd64-alpine text-align: left;
104-
style arm64-alpine text-align: left;
105-
style arm-alpine text-align: left;
103+
style amd64-musl text-align: left;
104+
style arm64-musl text-align: left;
105+
style arm-musl text-align: left;
106106
107107
style deps text-align: left;
108108
style builder text-align: left;
@@ -119,9 +119,9 @@ amd64("cross-amd64")
119119
arm64("cross-arm64")
120120
x86("cross-x86")
121121
arm("cross-arm")
122-
amd64-alpine("cross-amd64-alpine")
123-
arm64-alpine("cross-arm64-alpine")
124-
arm-alpine("cross-arm-alpine")
122+
amd64-musl("cross-amd64-musl")
123+
arm64-musl("cross-arm64-musl")
124+
arm-musl("cross-arm-musl")
125125
126126
llvm("crossdeps-llvm
127127
• source-built LLVM")
@@ -134,8 +134,8 @@ builder("crossdeps-builder
134134
• source-built LLVM")
135135
base("Azure Linux base image")
136136
137-
amd64 & arm64 & x86 & arm & amd64-alpine & arm64-alpine & arm-alpine ----> llvm
138-
amd64 & arm64 & x86 & arm & amd64-alpine & arm64-alpine & arm-alpine -.-> builder
137+
amd64 & arm64 & x86 & arm & amd64-musl & arm64-musl & arm-musl ----> llvm
138+
amd64 & arm64 & x86 & arm & amd64-musl & arm64-musl & arm-musl -.-> builder
139139
140140
llvm --> deps
141141
llvm -.-> builder

docs/workflow/using-docker.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,26 @@ The main Docker images are the most commonly used ones, and the ones you will pr
2626

2727
| Host OS | Target OS | Target Arch | Image | crossrootfs dir |
2828
| ----------------- | ------------ | --------------- | -------------------------------------------------------------------------------------- | -------------------- |
29-
| Azure Linux (x64) | Alpine 3.13 | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-amd64-alpine` | `/crossrootfs/x64` |
30-
| Azure Linux (x64) | Ubuntu 16.04 | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-amd64` | `/crossrootfs/x64` |
31-
| Azure Linux (x64) | Alpine 3.13 | Arm32 (armhf) | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-arm-alpine` | `/crossrootfs/arm` |
32-
| Azure Linux (x64) | Ubuntu 22.04 | Arm32 (armhf) | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-arm` | `/crossrootfs/arm` |
33-
| Azure Linux (x64) | Alpine 3.13 | Arm64 (arm64v8) | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-arm64-alpine` | `/crossrootfs/arm64` |
34-
| Azure Linux (x64) | Ubuntu 16.04 | Arm64 (arm64v8) | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-arm64` | `/crossrootfs/arm64` |
35-
| Azure Linux (x64) | Ubuntu 16.04 | x86 | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-x86` | `/crossrootfs/x86` |
29+
| Azure Linux (x64) | Alpine 3.13 | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-amd64-musl` | `/crossrootfs/x64` |
30+
| Azure Linux (x64) | Ubuntu 16.04 | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-amd64` | `/crossrootfs/x64` |
31+
| Azure Linux (x64) | Alpine 3.13 | Arm32 (armhf) | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-arm-musl` | `/crossrootfs/arm` |
32+
| Azure Linux (x64) | Ubuntu 22.04 | Arm32 (armhf) | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-arm` | `/crossrootfs/arm` |
33+
| Azure Linux (x64) | Alpine 3.13 | Arm64 (arm64v8) | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-arm64-musl` | `/crossrootfs/arm64` |
34+
| Azure Linux (x64) | Ubuntu 16.04 | Arm64 (arm64v8) | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-arm64` | `/crossrootfs/arm64` |
35+
| Azure Linux (x64) | Ubuntu 16.04 | x86 | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-x86` | `/crossrootfs/x86` |
3636

3737
**Extended Docker Images**
3838

3939
| Host OS | Target OS | Target Arch | Image | crossrootfs dir |
4040
| ----------------- | -------------------------- | ------------- | --------------------------------------------------------------------------------------- | ---------------------- |
41-
| Azure Linux (x64) | Android Bionic | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-android-amd64` | *N/A* |
42-
| Azure Linux (x64) | Android Bionic (w/OpenSSL) | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-android-openssl` | *N/A* |
43-
| Azure Linux (x64) | Android Bionic (w/Docker) | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-android-docker` | *N/A* |
44-
| Azure Linux (x64) | FreeBSD 13 | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-freebsd-13` | `/crossrootfs/x64` |
45-
| Azure Linux (x64) | Ubuntu 18.04 | PPC64le | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-ppc64le` | `/crossrootfs/ppc64le` |
46-
| Azure Linux (x64) | Ubuntu 24.04 | RISC-V | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-riscv64` | `/crossrootfs/riscv64` |
47-
| Azure Linux (x64) | Ubuntu 18.04 | S390x | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-s390x` | `/crossrootfs/s390x` |
48-
| Azure Linux (x64) | Ubuntu 16.04 (Wasm) | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-webassembly-amd64` | `/crossrootfs/x64` |
41+
| Azure Linux (x64) | Android Bionic | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-android-amd64` | *N/A* |
42+
| Azure Linux (x64) | Android Bionic (w/OpenSSL) | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-android-openssl` | *N/A* |
43+
| Azure Linux (x64) | Android Bionic (w/Docker) | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-android-docker` | *N/A* |
44+
| Azure Linux (x64) | FreeBSD 14 | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-freebsd-14` | `/crossrootfs/x64` |
45+
| Azure Linux (x64) | Ubuntu 18.04 | PPC64le | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-ppc64le` | `/crossrootfs/ppc64le` |
46+
| Azure Linux (x64) | Ubuntu 24.04 | RISC-V | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-riscv64` | `/crossrootfs/riscv64` |
47+
| Azure Linux (x64) | Ubuntu 18.04 | S390x | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-s390x` | `/crossrootfs/s390x` |
48+
| Azure Linux (x64) | Ubuntu 16.04 (Wasm) | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-webassembly-amd64` | `/crossrootfs/x64` |
4949
| Debian (x64) | Debian 12 | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-gcc14-amd64` | *N/A* |
5050
| Ubuntu (x64) | Tizen 9.0 | Arm32 (armel) | `mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-cross-armel-tizen` | `/crossrootfs/armel` |
5151
| Ubuntu (x64) | Ubuntu 20.04 | Arm32 (v6) | `mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04-cross-armv6-raspbian-10` | `/crossrootfs/armv6` |
@@ -58,7 +58,7 @@ Once you've chosen the image that suits your needs, you can issue `docker run` w
5858
docker run --rm \
5959
-v <RUNTIME_REPO_PATH>:/runtime \
6060
-w /runtime \
61-
mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-amd64 \
61+
mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-amd64 \
6262
./build.sh --subset clr --configuration Checked
6363
```
6464

@@ -67,7 +67,7 @@ Now, dissecting the command:
6767
- `--rm`: Erase the created container after it finishes running.
6868
- `-v <RUNTIME_REPO_PATH>:/runtime`: Mount the runtime repo clone located in `<RUNTIME_REPO_PATH>` to the container path `/runtime`.
6969
- `-w /runtime`: Start the container in the `/runtime` directory.
70-
- `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-amd64`: The fully qualified name of the Docker image to download. In this case, we want to use an *Azure Linux* image to target the *x64* architecture.
70+
- `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-amd64`: The fully qualified name of the Docker image to download. In this case, we want to use an *Azure Linux* image to target the *x64* architecture.
7171
- `./build.sh --subset clr --configuration Checked`: The build command to run in the repo. In this case, we want to build the *Clr* subset in the *Checked* configuration.
7272

7373
You might also want to interact with the container directly for a myriad of reasons, like running multiple builds in different paths for example. In this case, instead of passing the build script command to the `docker` command-line, pass the flag `-it`. When you do this, you will get access to a small shell within the container, which allows you to explore it, run builds manually, and so on, like you would on a regular terminal in your machine. Note that the containers' shell's built-in tools are very limited in comparison to the ones you probably have on your machine, so don't expect to be able to do full work there.

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

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ extends:
1717

1818
containers:
1919
linux_arm:
20-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-arm
20+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-arm
2121
env:
2222
ROOTFS_DIR: /crossrootfs/arm
2323

@@ -27,44 +27,44 @@ extends:
2727
ROOTFS_DIR: /crossrootfs/armv6
2828

2929
linux_arm64:
30-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-arm64
30+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-arm64
3131
env:
3232
ROOTFS_DIR: /crossrootfs/arm64
3333

3434
linux_musl_x64:
35-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-amd64-alpine
35+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-amd64-musl
3636
env:
3737
ROOTFS_DIR: /crossrootfs/x64
3838

3939
linux_musl_arm:
40-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-arm-alpine
40+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-arm-musl
4141
env:
4242
ROOTFS_DIR: /crossrootfs/arm
4343

4444
linux_musl_arm64:
45-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-arm64-alpine
45+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-arm64-musl
4646
env:
4747
ROOTFS_DIR: /crossrootfs/arm64
4848

4949
# This container contains all required toolsets to build for Android and for Linux with bionic libc.
5050
android:
51-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-android-amd64
51+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-android-amd64
5252

5353
# This container contains all required toolsets to build for Android and for Linux with bionic libc and a special layout of OpenSSL.
5454
linux_bionic:
55-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-android-openssl
55+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-android-openssl-amd64
5656

5757
# This container contains all required toolsets to build for Android as well as tooling to build docker images.
5858
android_docker:
59-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-android-docker
59+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-android-docker-amd64
6060

6161
linux_x64:
62-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-amd64
62+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-amd64
6363
env:
6464
ROOTFS_DIR: /crossrootfs/x64
6565

6666
linux_x86:
67-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-x86
67+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-x86
6868
env:
6969
ROOTFS_DIR: /crossrootfs/x86
7070

@@ -75,7 +75,7 @@ extends:
7575
image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.19-WithNode
7676

7777
linux_x64_sanitizer:
78-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-amd64-sanitizer
78+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-amd64-sanitizer
7979
env:
8080
ROOTFS_DIR: /crossrootfs/x64
8181

@@ -88,17 +88,17 @@ extends:
8888
image: mcr.microsoft.com/dotnet-buildtools/prereqs:almalinux-8-source-build
8989

9090
linux_s390x:
91-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-s390x
91+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-s390x
9292
env:
9393
ROOTFS_DIR: /crossrootfs/s390x
9494

9595
linux_ppc64le:
96-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-ppc64le
96+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-ppc64le
9797
env:
9898
ROOTFS_DIR: /crossrootfs/ppc64le
9999

100100
linux_riscv64:
101-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-riscv64
101+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-riscv64
102102
env:
103103
ROOTFS_DIR: /crossrootfs/riscv64
104104

@@ -109,17 +109,17 @@ extends:
109109
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8
110110

111111
browser_wasm:
112-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-webassembly-amd64
112+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-webassembly-amd64
113113
env:
114114
ROOTFS_DIR: /crossrootfs/x64
115115

116116
wasi_wasm:
117-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-webassembly-amd64
117+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-webassembly-amd64
118118
env:
119119
ROOTFS_DIR: /crossrootfs/x64
120120

121121
freebsd_x64:
122-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-freebsd-13
122+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-freebsd-14-amd64
123123
env:
124124
ROOTFS_DIR: /crossrootfs/x64
125125

src/coreclr/vm/arm/profiler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void ProfileSetFunctionIDInPlatformSpecificHandle(void * pPlatformSpecificHandle
5555
{
5656
LIMITED_METHOD_CONTRACT;
5757
_ASSERTE(pPlatformSpecificHandle != NULL);
58-
_ASSERTE(functionID != NULL);
58+
_ASSERTE(functionID != (FunctionID)NULL);
5959

6060
PROFILE_PLATFORM_SPECIFIC_DATA * pData = reinterpret_cast<PROFILE_PLATFORM_SPECIFIC_DATA *>(pPlatformSpecificHandle);
6161
pData->functionId = functionID;

src/coreclr/vm/arm/stubs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,7 @@ void ResolveHolder::Initialize(ResolveHolder* pResolveHolderRX,
10981098
_stub._cacheMask = CALL_STUB_CACHE_MASK * sizeof(void*);
10991099

11001100
_ASSERTE(resolveWorkerTarget == (PCODE)ResolveWorkerChainLookupAsmStub);
1101-
_ASSERTE(patcherTarget == NULL);
1101+
_ASSERTE(patcherTarget == (PCODE)NULL);
11021102
}
11031103

11041104
Stub *GenerateInitPInvokeFrameHelper()

src/coreclr/vm/method.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,7 +1022,7 @@ PCODE MethodDesc::GetNativeCode()
10221022
PCODE pCode = *ppCode;
10231023

10241024
#ifdef TARGET_ARM
1025-
if (pCode != NULL)
1025+
if (pCode != (PCODE)NULL)
10261026
pCode |= THUMB_CODE;
10271027
#endif
10281028
return pCode;
@@ -3135,10 +3135,10 @@ BOOL MethodDesc::SetNativeCodeInterlocked(PCODE addr, PCODE pExpected /*=NULL*/)
31353135
if (HasNativeCodeSlot())
31363136
{
31373137
#ifdef TARGET_ARM
3138-
_ASSERTE(IsThumbCode(addr) || (addr==NULL));
3138+
_ASSERTE(IsThumbCode(addr) || (addr == (PCODE)NULL));
31393139
addr &= ~THUMB_CODE;
31403140

3141-
if (pExpected != NULL)
3141+
if (pExpected != (PCODE)NULL)
31423142
{
31433143
_ASSERTE(IsThumbCode(pExpected));
31443144
pExpected &= ~THUMB_CODE;

src/native/external/zlib-ng.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ set(Z_PREFIX ON)
1515
set(WITH_RVV OFF)
1616
# We don't support ARMv6 and the check works incorrectly when compiling for ARMv7 w/ Thumb instruction set
1717
set(WITH_ARMV6 OFF)
18+
# The checks for NEON_AVAILABLE and NEON_HAS_LD4 work incorrectly when compiling for arm32.
19+
if(CLR_CMAKE_TARGET_ARCH_ARM AND CLR_CMAKE_TARGET_LINUX)
20+
set(WITH_NEON OFF)
21+
endif()
1822

1923
if (CLR_CMAKE_TARGET_BROWSER OR CLR_CMAKE_TARGET_WASI)
2024
# 'aligned_alloc' is not available in browser/wasi, yet it is set by zlib-ng/CMakeLists.txt.

0 commit comments

Comments
 (0)