-
Notifications
You must be signed in to change notification settings - Fork 13.4k
{aarch64,x86_64}-pc-windows-gnullvm: build host tools #140772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mati865
wants to merge
1
commit into
rust-lang:master
Choose a base branch
from
mati865:gnullvm-host
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+121
−18
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
src/ci/docker/host-x86_64/dist-aarch64-windows-gnullvm/Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
src/ci/docker/host-x86_64/dist-various-1/install-llvm-mingw.sh
This file was deleted.
Oops, something went wrong.
50 changes: 50 additions & 0 deletions
50
src/ci/docker/host-x86_64/dist-x86_64-windows-gnullvm/Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
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 |
13 changes: 13 additions & 0 deletions
13
src/ci/docker/host-x86_64/dist-x86_64-windows-gnullvm/install-llvm-mingw.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.