Mateusz Mikuła 2025-08-15 17:02:56 +02:00
parent 96ecc9042c
commit 30420321a3
9 changed files with 22 additions and 124 deletions

View file

@ -1,48 +0,0 @@
FROM ubuntu:24.04
WORKDIR /build
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
cmake \
curl \
g++ \
git \
make \
ninja-build \
python3 \
xz-utils
ENV ARCH=aarch64
COPY host-x86_64/dist-x86_64-windows-gnullvm/install-llvm-mingw.sh /build
RUN ./install-llvm-mingw.sh
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh
ENV CC_aarch64_pc_windows_gnullvm=aarch64-w64-mingw32-clang \
CXX_aarch64_pc_windows_gnullvm=aarch64-w64-mingw32-clang++
ENV HOST=aarch64-pc-windows-gnullvm
# We are bootstrapping this target and cannot use previously built artifacts.
# Without this option Clang is given `"-I/checkout/obj/build/aarch64-pc-windows-gnullvm/ci-llvm/include"`
# despite no such directory existing:
# $ ls obj/dist-windows-gnullvm/build/aarch64-pc-windows-gnullvm/ -1
# llvm
# stage2
ENV NO_DOWNLOAD_CI_LLVM 1
ENV RUST_CONFIGURE_ARGS \
--enable-extended \
--enable-profiler \
--enable-sanitizers \
--disable-docs \
--set llvm.download-ci-llvm=false \
--set rust.llvm-tools=false
# LLVM cross tools are not installed into expected location so copying fails.
# Probably will solve itself once this target can host itself on Windows.
# --enable-full-tools \
ENV SCRIPT python3 ../x.py dist --host $HOST --target $HOST

View file

@ -55,6 +55,9 @@ RUN ./install-riscv64-none-elf.sh
COPY host-x86_64/dist-various-1/install-riscv32-none-elf.sh /build
RUN ./install-riscv32-none-elf.sh
COPY host-x86_64/dist-various-1/install-llvm-mingw.sh /build
RUN ./install-llvm-mingw.sh
# Suppress some warnings in the openwrt toolchains we downloaded
ENV STAGING_DIR=/tmp
@ -111,6 +114,9 @@ ENV TARGETS=$TARGETS,armv7r-none-eabi
ENV TARGETS=$TARGETS,armv7r-none-eabihf
ENV TARGETS=$TARGETS,thumbv7neon-unknown-linux-gnueabihf
ENV TARGETS=$TARGETS,armv7a-none-eabi
ENV TARGETS=$TARGETS,aarch64-pc-windows-gnullvm
ENV TARGETS=$TARGETS,i686-pc-windows-gnullvm
ENV TARGETS=$TARGETS,x86_64-pc-windows-gnullvm
ENV CFLAGS_armv5te_unknown_linux_musleabi="-march=armv5te -marm -mfloat-abi=soft" \
CFLAGS_arm_unknown_linux_musleabi="-march=armv6 -marm" \
@ -142,7 +148,10 @@ ENV CFLAGS_armv5te_unknown_linux_musleabi="-march=armv5te -marm -mfloat-abi=soft
CC_riscv64imac_unknown_none_elf=riscv64-unknown-elf-gcc \
CFLAGS_riscv64imac_unknown_none_elf=-march=rv64imac -mabi=lp64 \
CC_riscv64gc_unknown_none_elf=riscv64-unknown-elf-gcc \
CFLAGS_riscv64gc_unknown_none_elf=-march=rv64gc -mabi=lp64
CFLAGS_riscv64gc_unknown_none_elf=-march=rv64gc -mabi=lp64 \
CC_aarch64_pc_windows_gnullvm=aarch64-w64-mingw32-clang \
CC_i686_pc_windows_gnullvm=i686-w64-mingw32-clang \
CC_x86_64_pc_windows_gnullvm=x86_64-w64-mingw32-clang
ENV RUST_CONFIGURE_ARGS \
--musl-root-armv5te=/musl-armv5te \

View file

@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -ex
release_date=20240404
archive=llvm-mingw-${release_date}-ucrt-ubuntu-20.04-x86_64.tar.xz
curl -L https://github.com/mstorsjo/llvm-mingw/releases/download/${release_date}/${archive} | \
tar --extract --lzma --strip 1 --directory /usr/local

View file

@ -1,50 +0,0 @@
FROM ubuntu:24.04
WORKDIR /build
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
cmake \
curl \
g++ \
git \
make \
ninja-build \
python3 \
xz-utils
ENV ARCH='i686 x86_64'
COPY host-x86_64/dist-x86_64-windows-gnullvm/install-llvm-mingw.sh /build
RUN ./install-llvm-mingw.sh
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh
ENV CC_i686_pc_windows_gnullvm=i686-w64-mingw32-clang \
CC_x86_64_pc_windows_gnullvm=x86_64-w64-mingw32-clang \
CXX_x86_64_pc_windows_gnullvm=x86_64-w64-mingw32-clang++
ENV HOST=x86_64-pc-windows-gnullvm
ENV TARGETS=i686-pc-windows-gnullvm,x86_64-pc-windows-gnullvm
# We are bootstrapping this target and cannot use previously built artifacts.
# Without this option Clang is given `"-I/checkout/obj/build/aarch64-pc-windows-gnullvm/ci-llvm/include"`
# despite no such directory existing:
# $ ls obj/dist-windows-gnullvm/build/aarch64-pc-windows-gnullvm/ -1
# llvm
# stage2
ENV NO_DOWNLOAD_CI_LLVM 1
ENV RUST_CONFIGURE_ARGS \
--enable-extended \
--enable-profiler \
--enable-sanitizers \
--disable-docs \
--set llvm.download-ci-llvm=false \
--set rust.llvm-tools=false
# LLVM cross tools are not installed into expected location so copying fails.
# Probably will solve itself once these targets can host themselves on Windows.
# --enable-full-tools \
ENV SCRIPT python3 ../x.py dist --host $HOST --target $TARGETS

View file

@ -1,13 +0,0 @@
#!/usr/bin/env bash
set -ex
release_date=20250613
archive=llvm-mingw-${release_date}-ucrt-ubuntu-22.04-x86_64.tar.xz
curl -L https://github.com/mstorsjo/llvm-mingw/releases/download/${release_date}/${archive} | \
tar --extract --xz --strip 1 --directory /usr/local
# https://github.com/mstorsjo/llvm-mingw/issues/493
for arch in $ARCH; do
ln -s $arch-w64-windows-gnu.cfg /usr/local/bin/$arch-pc-windows-gnu.cfg
done

View file

@ -260,12 +260,6 @@ auto:
- name: dist-s390x-linux
<<: *job-linux-4c
- name: dist-aarch64-windows-gnullvm
<<: *job-linux-4c
- name: dist-x86_64-windows-gnullvm
<<: *job-linux-4c
- name: dist-various-1
<<: *job-linux-4c

View file

@ -88,7 +88,6 @@ so Rustup may install the documentation for a similar tier 1 target instead.
target | notes
-------|-------
[`aarch64-pc-windows-gnullvm`](platform-support/windows-gnullvm.md) | ARM64 MinGW (Windows 10+), LLVM ABI
[`aarch64-pc-windows-msvc`](platform-support/windows-msvc.md) | ARM64 Windows MSVC
[`aarch64-unknown-linux-musl`](platform-support/aarch64-unknown-linux-musl.md) | ARM64 Linux with musl 1.2.3
[`aarch64-unknown-linux-ohos`](platform-support/openharmony.md) | ARM64 OpenHarmony
@ -106,7 +105,6 @@ target | notes
[`riscv64gc-unknown-linux-gnu`](platform-support/riscv64gc-unknown-linux-gnu.md) | RISC-V Linux (kernel 4.20+, glibc 2.29)
[`riscv64gc-unknown-linux-musl`](platform-support/riscv64gc-unknown-linux-musl.md) | RISC-V Linux (kernel 4.20+, musl 1.2.3)
[`s390x-unknown-linux-gnu`](platform-support/s390x-unknown-linux-gnu.md) | S390x Linux (kernel 3.2+, glibc 2.17)
[`x86_64-pc-windows-gnullvm`](platform-support/windows-gnullvm.md) | 64-bit x86 MinGW (Windows 10+), LLVM ABI
[`x86_64-unknown-freebsd`](platform-support/freebsd.md) | 64-bit x86 FreeBSD
[`x86_64-unknown-illumos`](platform-support/illumos.md) | illumos
`x86_64-unknown-linux-musl` | 64-bit Linux with musl 1.2.3
@ -149,6 +147,7 @@ target | std | notes
[`aarch64-apple-ios-macabi`](platform-support/apple-ios-macabi.md) | ✓ | Mac Catalyst on ARM64
[`aarch64-apple-ios-sim`](platform-support/apple-ios.md) | ✓ | Apple iOS Simulator on ARM64
[`aarch64-linux-android`](platform-support/android.md) | ✓ | ARM64 Android
[`aarch64-pc-windows-gnullvm`](platform-support/windows-gnullvm.md) | ✓ | ARM64 MinGW (Windows 10+), LLVM ABI
[`aarch64-unknown-fuchsia`](platform-support/fuchsia.md) | ✓ | ARM64 Fuchsia
`aarch64-unknown-none` | * | Bare ARM64, hardfloat
`aarch64-unknown-none-softfloat` | * | Bare ARM64, softfloat
@ -205,6 +204,7 @@ target | std | notes
[`x86_64-apple-ios-macabi`](platform-support/apple-ios-macabi.md) | ✓ | Mac Catalyst on x86_64
[`x86_64-fortanix-unknown-sgx`](platform-support/x86_64-fortanix-unknown-sgx.md) | ✓ | [Fortanix ABI] for 64-bit Intel SGX
[`x86_64-linux-android`](platform-support/android.md) | ✓ | 64-bit x86 Android
[`x86_64-pc-windows-gnullvm`](platform-support/windows-gnullvm.md) | ✓ | 64-bit x86 MinGW (Windows 10+), LLVM ABI
[`x86_64-unknown-fuchsia`](platform-support/fuchsia.md) | ✓ | 64-bit x86 Fuchsia
`x86_64-unknown-linux-gnux32` | ✓ | 64-bit Linux (x32 ABI) (kernel 4.15+, glibc 2.27)
[`x86_64-unknown-none`](platform-support/x86_64-unknown-none.md) | * | Freestanding/bare-metal x86_64, softfloat

View file

@ -1,6 +1,6 @@
# \*-windows-gnullvm
**Tier: 2 (with host tools)**
**Tier: 2 (without host tools)**
Windows targets similar to `*-windows-gnu` but using UCRT as the runtime and various LLVM tools/libraries instead of GCC/Binutils.

View file

@ -14,7 +14,6 @@ use crate::versions::{PkgType, Versions};
static HOSTS: &[&str] = &[
"aarch64-apple-darwin",
"aarch64-pc-windows-gnullvm",
"aarch64-pc-windows-msvc",
"aarch64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
@ -45,7 +44,6 @@ static HOSTS: &[&str] = &[
"x86_64-apple-darwin",
"x86_64-pc-solaris",
"x86_64-pc-windows-gnu",
"x86_64-pc-windows-gnullvm",
"x86_64-pc-windows-msvc",
"x86_64-unknown-freebsd",
"x86_64-unknown-illumos",
@ -472,7 +470,7 @@ impl Builder {
}
// so is rust-mingw if it's available for the target
PkgType::RustMingw => {
if host.ends_with("pc-windows-gnu") {
if host.contains("pc-windows-gnu") {
components.push(host_component(pkg));
}
}