9 files changed +91
-2
lines changed Original file line number Diff line number Diff line change 1
1
Change this file to make users of the `download-ci-llvm` configuration download
2
2
a new version of LLVM from CI, even if the LLVM submodule hasn’t changed.
3
3
4
- Last change is for: https://github.com/rust-lang/rust/pull/125141
4
+ Last change is for: https://github.com/rust-lang/rust/pull/126298
Original file line number Diff line number Diff line change @@ -217,6 +217,7 @@ pub(crate) fn is_ci_llvm_available(config: &Config, asserts: bool) -> bool {
217
217
( "arm-unknown-linux-gnueabihf" , false ) ,
218
218
( "armv7-unknown-linux-gnueabihf" , false ) ,
219
219
( "loongarch64-unknown-linux-gnu" , false ) ,
220
+ ( "loongarch64-unknown-linux-musl" , false ) ,
220
221
( "mips-unknown-linux-gnu" , false ) ,
221
222
( "mips64-unknown-linux-gnuabi64" , false ) ,
222
223
( "mips64el-unknown-linux-gnuabi64" , false ) ,
Original file line number Diff line number Diff line change @@ -271,6 +271,22 @@ For targets: `loongarch64-unknown-linux-gnu`
271
271
- C compiler > gcc version = 13.2.0
272
272
- C compiler > C++ = ENABLE -- to cross compile LLVM
273
273
274
+ ### `loongarch64-linux-musl.defconfig`
275
+
276
+ For targets: `loongarch64-unknown-linux-musl`
277
+
278
+ - Path and misc options > Prefix directory = /x-tools/${CT\_TARGET}
279
+ - Path and misc options > Use a mirror = ENABLE
280
+ - Path and misc options > Base URL = https://ci-mirrors.rust-lang.org/rustc
281
+ - Target options > Target Architecture = loongarch
282
+ - Target options > Bitness = 64-bit
283
+ - Operating System > Target OS = linux
284
+ - Operating System > Linux kernel version = 5.19.16
285
+ - Binary utilities > Version of binutils = 2.41
286
+ - C-library > musl version = 1.2.5
287
+ - C compiler > gcc version = 13.2.0
288
+ - C compiler > C++ = ENABLE -- to cross compile LLVM
289
+
274
290
### `mips-linux-gnu.defconfig`
275
291
276
292
For targets: `mips-unknown-linux-gnu`
Original file line number Diff line number Diff line change
1
+ FROM ubuntu:22.04
2
+
3
+ COPY scripts/cross-apt-packages.sh /scripts/
4
+ RUN sh /scripts/cross-apt-packages.sh
5
+
6
+ COPY scripts/crosstool-ng-git.sh /scripts/
7
+ RUN sh /scripts/crosstool-ng-git.sh
8
+
9
+ COPY scripts/rustbuild-setup.sh /scripts/
10
+ RUN sh /scripts/rustbuild-setup.sh
11
+ WORKDIR /tmp
12
+
13
+ COPY scripts/crosstool-ng-build.sh /scripts/
14
+ COPY host-x86_64/dist-loongarch64-musl/loongarch64-unknown-linux-musl.defconfig /tmp/crosstool.defconfig
15
+ RUN /scripts/crosstool-ng-build.sh
16
+
17
+ COPY scripts/sccache.sh /scripts/
18
+ RUN sh /scripts/sccache.sh
19
+
20
+ ENV PATH=$PATH:/x-tools/loongarch64-unknown-linux-musl/bin
21
+
22
+ ENV CC_loongarch64_unknown_linux_musl=loongarch64-unknown-linux-musl-gcc \
23
+ AR_loongarch64_unknown_linux_musl=loongarch64-unknown-linux-musl-ar \
24
+ CXX_loongarch64_unknown_linux_musl=loongarch64-unknown-linux-musl-g++
25
+
26
+ ENV HOSTS=loongarch64-unknown-linux-musl
27
+
28
+ ENV RUST_CONFIGURE_ARGS \
29
+ --enable-extended \
30
+ --enable-lld \
31
+ --disable-docs \
32
+ --set target.loongarch64-unknown-linux-musl.crt-static=false \
33
+ --musl-root-loongarch64=/x-tools/loongarch64-unknown-linux-musl/loongarch64-unknown-linux-musl/sysroot/usr
34
+
35
+ ENV SCRIPT python3 ../x.py dist --host $HOSTS --target $HOSTS
Original file line number Diff line number Diff line change
1
+ CT_CONFIG_VERSION="4"
2
+ CT_EXPERIMENTAL=y
3
+ CT_PREFIX_DIR="/x-tools/${CT_TARGET}"
4
+ CT_USE_MIRROR=y
5
+ CT_MIRROR_BASE_URL="https://ci-mirrors.rust-lang.org/rustc"
6
+ CT_ARCH_LOONGARCH=y
7
+ # CT_DEMULTILIB is not set
8
+ CT_ARCH_USE_MMU=y
9
+ CT_ARCH_ARCH="loongarch64"
10
+ CT_KERNEL_LINUX=y
11
+ CT_LINUX_V_5_19=y
12
+ CT_LIBC_MUSL=y
13
+ CT_CC_GCC_ENABLE_DEFAULT_PIE=y
14
+ CT_CC_LANG_CXX=y
15
+ CT_GETTEXT_NEEDED=y
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ set -ex
3
+
4
+ URL=https://github.com/crosstool-ng/crosstool-ng
5
+ REV=c64500d94be92ed1bcdfdef911048a14e216a5e1
6
+
7
+ mkdir crosstool-ng
8
+ cd crosstool-ng
9
+ git init
10
+ git fetch --depth=1 ${URL} ${REV}
11
+ git reset --hard FETCH_HEAD
12
+ ./bootstrap
13
+ ./configure --prefix=/usr/local
14
+ make -j$( nproc)
15
+ make install
16
+ cd ..
17
+ rm -rf crosstool-ng
Original file line number Diff line number Diff line change @@ -144,6 +144,9 @@ auto:
144
144
- image : dist-loongarch64-linux
145
145
<< : *job-linux-4c
146
146
147
+ - image : dist-loongarch64-musl
148
+ << : *job-linux-4c
149
+
147
150
- image : dist-ohos
148
151
<< : *job-linux-4c
149
152
Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ target | notes
93
93
` arm-unknown-linux-gnueabihf ` | Armv6 Linux, hardfloat (kernel 3.2, glibc 2.17)
94
94
` armv7-unknown-linux-gnueabihf ` | Armv7-A Linux, hardfloat (kernel 3.2, glibc 2.17)
95
95
[ ` loongarch64-unknown-linux-gnu ` ] ( platform-support/loongarch-linux.md ) | LoongArch64 Linux, LP64D ABI (kernel 5.19, glibc 2.36)
96
+ [ ` loongarch64-unknown-linux-musl ` ] ( platform-support/loongarch-linux.md ) | LoongArch64 Linux, LP64D ABI (kernel 5.19, musl 1.2.5)
96
97
` powerpc-unknown-linux-gnu ` | PowerPC Linux (kernel 3.2, glibc 2.17)
97
98
` powerpc64-unknown-linux-gnu ` | PPC64 Linux (kernel 3.2, glibc 2.17)
98
99
` powerpc64le-unknown-linux-gnu ` | PPC64LE Linux (kernel 3.10, glibc 2.17)
@@ -305,7 +306,6 @@ target | std | host | notes
305
306
` i686-uwp-windows-msvc ` | ✓ | | [ ^ x86_32-floats-return-ABI ]
306
307
[ ` i686-win7-windows-msvc ` ] ( platform-support/win7-windows-msvc.md ) | ✓ | | 32-bit Windows 7 support [ ^ x86_32-floats-return-ABI ]
307
308
` i686-wrs-vxworks ` | ? | | [ ^ x86_32-floats-return-ABI ]
308
- [ ` loongarch64-unknown-linux-musl ` ] ( platform-support/loongarch-linux.md ) | ? | | LoongArch64 Linux (LP64D ABI) with musl 1.2.3
309
309
[ ` m68k-unknown-linux-gnu ` ] ( platform-support/m68k-unknown-linux-gnu.md ) | ? | | Motorola 680x0 Linux
310
310
` mips-unknown-linux-gnu ` | ✓ | ✓ | MIPS Linux (kernel 4.4, glibc 2.23)
311
311
` mips-unknown-linux-musl ` | ✓ | | MIPS Linux with musl 1.2.3
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ static HOSTS: &[&str] = &[
25
25
"i686-pc-windows-msvc" ,
26
26
"i686-unknown-linux-gnu" ,
27
27
"loongarch64-unknown-linux-gnu" ,
28
+ "loongarch64-unknown-linux-musl" ,
28
29
"mips-unknown-linux-gnu" ,
29
30
"mips64-unknown-linux-gnuabi64" ,
30
31
"mips64el-unknown-linux-gnuabi64" ,
@@ -106,6 +107,7 @@ static TARGETS: &[&str] = &[
106
107
"i686-unknown-redox" ,
107
108
"i686-unknown-uefi" ,
108
109
"loongarch64-unknown-linux-gnu" ,
110
+ "loongarch64-unknown-linux-musl" ,
109
111
"loongarch64-unknown-none" ,
110
112
"loongarch64-unknown-none-softfloat" ,
111
113
"m68k-unknown-linux-gnu" ,
0 commit comments