forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#110519 - loongarch-rs:ci, r=Mark-Simulacrum
ci: Add support for dist-loongarch64-linux We are preparing to promote loongarch64-unknown-linux-gnu to Tier 2, and one of the tasks is to add CI support. We are currently in the process of upgrading the dependencies for the build tools, and before this is completed, we would like to request comments. Thanks #### Progress - [x] Update linux-raw-sys to 0.3.2 (rust-lang/cargo#11998) - [x] Update openssl-src to 111.25.3+1.1.1t (rust-lang/cargo#12005) - [x] bootstrap: Update linux-raw-sys to 0.3.2 (rust-lang#110516) - [x] Update linux-raw-sys to 0.3.4 (rust-lang#110518) - [x] Update cargo (rust-lang#110834) - [x] linux_like: Add missing constants for loongarch64 (rust-lang/libc#3237) - [x] Release 0.2.143 (rust-lang/libc#3236) - [x] Update libc to 0.2.144 (rust-lang/cargo#12098) - [x] Update cargo (rust-lang#111456) Tier 2 with host tools MCP: rust-lang/compiler-team#518
- Loading branch information
Showing
7 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 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
30 changes: 30 additions & 0 deletions
30
src/ci/docker/host-x86_64/dist-loongarch64-linux/Dockerfile
This file contains 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,30 @@ | ||
FROM ubuntu:22.04 | ||
|
||
COPY scripts/cross-apt-packages.sh /scripts/ | ||
RUN sh /scripts/cross-apt-packages.sh | ||
|
||
# The latest released version does not support LoongArch. | ||
COPY scripts/crosstool-ng-git.sh /scripts/ | ||
RUN sh /scripts/crosstool-ng-git.sh | ||
|
||
COPY scripts/rustbuild-setup.sh /scripts/ | ||
RUN sh /scripts/rustbuild-setup.sh | ||
WORKDIR /tmp | ||
|
||
COPY scripts/crosstool-ng-build.sh /scripts/ | ||
COPY host-x86_64/dist-loongarch64-linux/loongarch64-unknown-linux-gnu.defconfig /tmp/crosstool.defconfig | ||
RUN /scripts/crosstool-ng-build.sh | ||
|
||
COPY scripts/sccache.sh /scripts/ | ||
RUN sh /scripts/sccache.sh | ||
|
||
ENV PATH=$PATH:/x-tools/loongarch64-unknown-linux-gnu/bin | ||
|
||
ENV CC_loongarch64_unknown_linux_gnu=loongarch64-unknown-linux-gnu-gcc \ | ||
AR_loongarch64_unknown_linux_gnu=loongarch64-unknown-linux-gnu-ar \ | ||
CXX_loongarch64_unknown_linux_gnu=loongarch64-unknown-linux-gnu-g++ | ||
|
||
ENV HOSTS=loongarch64-unknown-linux-gnu | ||
|
||
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs | ||
ENV SCRIPT python3 ../x.py dist --host $HOSTS --target $HOSTS |
14 changes: 14 additions & 0 deletions
14
src/ci/docker/host-x86_64/dist-loongarch64-linux/loongarch64-unknown-linux-gnu.defconfig
This file contains 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,14 @@ | ||
CT_CONFIG_VERSION="4" | ||
CT_EXPERIMENTAL=y | ||
CT_PREFIX_DIR="/x-tools/${CT_TARGET}" | ||
CT_USE_MIRROR=y | ||
CT_MIRROR_BASE_URL="https://ci-mirrors.rust-lang.org/rustc" | ||
CT_ARCH_LOONGARCH=y | ||
# CT_DEMULTILIB is not set | ||
CT_ARCH_USE_MMU=y | ||
CT_ARCH_ARCH="loongarch64" | ||
CT_KERNEL_LINUX=y | ||
CT_LINUX_V_5_19=y | ||
CT_GLIBC_V_2_36=y | ||
CT_CC_GCC_ENABLE_DEFAULT_PIE=y | ||
CT_CC_LANG_CXX=y |
This file contains 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 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,17 @@ | ||
#!/bin/sh | ||
set -ex | ||
|
||
URL=https://github.com/crosstool-ng/crosstool-ng | ||
REV=943364711a650d9b9e84c1b42c91cc0265b6ab5c | ||
|
||
mkdir crosstool-ng | ||
cd crosstool-ng | ||
git init | ||
git fetch --depth=1 ${URL} ${REV} | ||
git reset --hard FETCH_HEAD | ||
./bootstrap | ||
./configure --prefix=/usr/local | ||
make -j$(nproc) | ||
make install | ||
cd .. | ||
rm -rf crosstool-ng |
This file contains 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