4040 - x86_64-pc-windows-msvc
4141 - aarch64-pc-windows-msvc
4242 - x86_64-pc-windows-gnu
43+ - aarch64-pc-windows-gnullvm
4344 include :
4445 - target : x86_64-pc-windows-msvc
4546 run_tests : YES
5253 rustup_arch : aarch64
5354 os : windows-11-arm
5455 run_tests : YES
56+ - target : aarch64-pc-windows-gnullvm
57+ rustup_arch : aarch64
58+ os : windows-11-arm
59+ llvm_mingw_version : 20260616
60+ gcc : aarch64-w64-mingw32-clang
5561 steps :
5662 - uses : actions/checkout@v7
5763 # v2 defaults to a shallow checkout, but we need at least to the previous tag
7985 if : matrix.mingwdir != ''
8086 with :
8187 architecture : ${{ matrix.arch }}
88+ - name : Install llvm-mingw
89+ shell : powershell
90+ if : matrix.llvm_mingw_version != ''
91+ run : |
92+ $version = "${{ matrix.llvm_mingw_version }}"
93+ $archive = "llvm-mingw-$version-ucrt-${{ matrix.rustup_arch }}.zip"
94+ $url = "https://github.com/mstorsjo/llvm-mingw/releases/download/$version/$archive"
95+ $destination = Join-Path $env:RUNNER_TEMP $archive
96+ $installDir = Join-Path $env:RUNNER_TEMP "llvm-mingw-$version-ucrt-${{ matrix.rustup_arch }}"
97+
98+ Write-Host "Downloading $archive with aria2c"
99+ & aria2c --max-connection-per-server=8 --split=8 --dir="$env:RUNNER_TEMP" --out="$archive" "$url"
100+
101+ Write-Host "Extracting $archive with 7-Zip"
102+ & 7z x "$destination" "-o$env:RUNNER_TEMP" -y
103+
104+ $targetEnvUpper = "${{ matrix.target }}".Replace('-', '_').ToUpperInvariant()
105+
106+ "$installDir\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
107+ "CC_${targetEnvUpper}=${{ matrix.gcc }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
108+ "CARGO_TARGET_${targetEnvUpper}_LINKER=${{ matrix.gcc }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
82109 - name : Verify mingw gcc installation
83110 shell : powershell
84111 if : matrix.gcc != ''
@@ -212,6 +239,7 @@ jobs:
212239 - x86_64-pc-windows-msvc
213240 - aarch64-pc-windows-msvc
214241 - x86_64-pc-windows-gnu
242+ - aarch64-pc-windows-gnullvm
215243 include :
216244 - target : x86_64-pc-windows-msvc
217245 run_tests : YES
@@ -224,6 +252,11 @@ jobs:
224252 rustup_arch : aarch64
225253 os : windows-11-arm
226254 run_tests : YES
255+ - target : aarch64-pc-windows-gnullvm
256+ rustup_arch : aarch64
257+ os : windows-11-arm
258+ llvm_mingw_version : 20260616
259+ gcc : aarch64-w64-mingw32-clang
227260 steps :
228261 - uses : actions/checkout@v7
229262 # v2 defaults to a shallow checkout, but we need at least to the previous tag
@@ -251,6 +284,27 @@ jobs:
251284 if : matrix.mingwdir != ''
252285 with :
253286 architecture : ${{ matrix.arch }}
287+ - name : Install llvm-mingw
288+ shell : powershell
289+ if : matrix.llvm_mingw_version != ''
290+ run : |
291+ $version = "${{ matrix.llvm_mingw_version }}"
292+ $archive = "llvm-mingw-$version-ucrt-${{ matrix.rustup_arch }}.zip"
293+ $url = "https://github.com/mstorsjo/llvm-mingw/releases/download/$version/$archive"
294+ $destination = Join-Path $env:RUNNER_TEMP $archive
295+ $installDir = Join-Path $env:RUNNER_TEMP "llvm-mingw-$version-ucrt-${{ matrix.rustup_arch }}"
296+
297+ Write-Host "Downloading $archive with aria2c"
298+ & aria2c --max-connection-per-server=8 --split=8 --dir="$env:RUNNER_TEMP" --out="$archive" "$url"
299+
300+ Write-Host "Extracting $archive with 7-Zip"
301+ & 7z x "$destination" "-o$env:RUNNER_TEMP" -y
302+
303+ $targetEnvUpper = "${{ matrix.target }}".Replace('-', '_').ToUpperInvariant()
304+
305+ "$installDir\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
306+ "CC_${targetEnvUpper}=${{ matrix.gcc }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
307+ "CARGO_TARGET_${targetEnvUpper}_LINKER=${{ matrix.gcc }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
254308 - name : Verify mingw gcc installation
255309 shell : powershell
256310 if : matrix.gcc != ''
@@ -386,6 +440,7 @@ jobs:
386440 - aarch64-pc-windows-msvc
387441 - x86_64-pc-windows-gnu
388442 - i686-pc-windows-gnu # skip-pr skip-main
443+ - aarch64-pc-windows-gnullvm
389444 include :
390445 - target : x86_64-pc-windows-msvc
391446 run_tests : YES
@@ -398,6 +453,11 @@ jobs:
398453 rustup_arch : aarch64
399454 os : windows-11-arm
400455 run_tests : YES
456+ - target : aarch64-pc-windows-gnullvm
457+ rustup_arch : aarch64
458+ os : windows-11-arm
459+ llvm_mingw_version : 20260616
460+ gcc : aarch64-w64-mingw32-clang
401461 - target : i686-pc-windows-gnu # skip-pr skip-main
402462 arch : i686 # skip-pr skip-main
403463 mingwdir : mingw32 # skip-pr skip-main
@@ -429,6 +489,27 @@ jobs:
429489 if : matrix.mingwdir != ''
430490 with :
431491 architecture : ${{ matrix.arch }}
492+ - name : Install llvm-mingw
493+ shell : powershell
494+ if : matrix.llvm_mingw_version != ''
495+ run : |
496+ $version = "${{ matrix.llvm_mingw_version }}"
497+ $archive = "llvm-mingw-$version-ucrt-${{ matrix.rustup_arch }}.zip"
498+ $url = "https://github.com/mstorsjo/llvm-mingw/releases/download/$version/$archive"
499+ $destination = Join-Path $env:RUNNER_TEMP $archive
500+ $installDir = Join-Path $env:RUNNER_TEMP "llvm-mingw-$version-ucrt-${{ matrix.rustup_arch }}"
501+
502+ Write-Host "Downloading $archive with aria2c"
503+ & aria2c --max-connection-per-server=8 --split=8 --dir="$env:RUNNER_TEMP" --out="$archive" "$url"
504+
505+ Write-Host "Extracting $archive with 7-Zip"
506+ & 7z x "$destination" "-o$env:RUNNER_TEMP" -y
507+
508+ $targetEnvUpper = "${{ matrix.target }}".Replace('-', '_').ToUpperInvariant()
509+
510+ "$installDir\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
511+ "CC_${targetEnvUpper}=${{ matrix.gcc }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
512+ "CARGO_TARGET_${targetEnvUpper}_LINKER=${{ matrix.gcc }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
432513 - name : Verify mingw gcc installation
433514 shell : powershell
434515 if : matrix.gcc != ''
0 commit comments