-
Notifications
You must be signed in to change notification settings - Fork 13.4k
{aarch64,x86_64}-*-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
base: master
Are you sure you want to change the base?
Changes from all commits
a7e39b2
f269a1b
f602369
120556b
a3a585a
cacda77
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
FROM ubuntu:22.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 | ||
|
||
COPY host-x86_64/dist-aarch64-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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
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 when building from Windows. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same question asked before. Why don't we build from windows now? Is it for the time required to change this PR and we want to ship this earlier? 🤔 |
||
# --enable-full-tools \ | ||
|
||
ENV SCRIPT python3 ../x.py dist --host $HOST --target $HOST |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
|
||
release_date=20250430 | ||
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 | ||
ln -s aarch64-w64-windows-gnu.cfg /usr/local/bin/aarch64-pc-windows-gnu.cfg |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
FROM ubuntu:22.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 | ||
|
||
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 | ||
Comment on lines
+33
to
+35
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same comments as above |
||
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 when building from Windows. | ||
# --enable-full-tools \ | ||
|
||
ENV SCRIPT python3 ../x.py dist --host $HOST --target $TARGETS |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this file is very similar to Can we share the logic somehow? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
|
||
release_date=20250528 | ||
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 i686 x86_64; do | ||
ln -s $arch-w64-windows-gnu.cfg /usr/local/bin/$arch-pc-windows-gnu.cfg | ||
done |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -237,6 +237,12 @@ auto: | |
- name: dist-s390x-linux | ||
<<: *job-linux-4c | ||
|
||
- name: dist-aarch64-windows-gnullvm | ||
<<: *job-linux-4c | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why not using the free arm runner instead of the x86 one? |
||
|
||
- name: dist-x86_64-windows-gnullvm | ||
<<: *job-linux-4c | ||
|
||
- name: dist-various-1 | ||
<<: *job-linux-4c | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's more familiar to use
$
instead of❯
to indicate a prompt.