Skip to content
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

Rollup of 9 pull requests #126891

Merged
merged 20 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
65530ba
std::unix::fs: copy simplification for apple.
devnexen Jun 21, 2024
9905357
cargo update
invalid-email-address Jun 23, 2024
e8b5ba1
For [E0308]: mismatched types, when expr is in an arm's body, not add…
surechen Jun 14, 2024
0d8f734
compiler: Fix arm32 asm issues by hierarchically sorting reg classes
workingjubilee Jun 23, 2024
bd9ce3e
std::unix::os::home_dir: fallback's optimisation.
devnexen Jun 23, 2024
fc50aca
fix build
devnexen Jun 23, 2024
03d73fa
ci: Add support for dist-loongarch64-musl
heiher Mar 5, 2024
16fef40
Promote loongarch64-unknown-linux-musl to Tier 2 with host tools
heiher Nov 13, 2023
a426d6f
Implement use<> formatting in rustfmt
compiler-errors Jun 20, 2024
a23917c
Add hard error and migration lint for unsafe attrs
carbotaniuman Jun 8, 2024
25446c2
Remove stray println from rustfmt
compiler-errors Jun 24, 2024
9a591ea
Rollup merge of #126177 - carbotaniuman:unsafe_attr_errors, r=jieyouxu
matthiaskrgr Jun 24, 2024
7babf99
Rollup merge of #126298 - heiher:loongarch64-musl-ci, r=Mark-Simulacrum
matthiaskrgr Jun 24, 2024
ad0531a
Rollup merge of #126455 - surechen:fix_126222, r=estebank
matthiaskrgr Jun 24, 2024
b24e3df
Rollup merge of #126754 - compiler-errors:use-rustfmt, r=calebcartwright
matthiaskrgr Jun 24, 2024
21850f5
Rollup merge of #126807 - devnexen:copy_file_macos_simpl, r=Mark-Simu…
matthiaskrgr Jun 24, 2024
dcace86
Rollup merge of #126845 - rust-lang:cargo_update, r=Mark-Simulacrum
matthiaskrgr Jun 24, 2024
3108dfa
Rollup merge of #126849 - workingjubilee:correctly-classify-arm-low-d…
matthiaskrgr Jun 24, 2024
9892b3e
Rollup merge of #126854 - devnexen:std_unix_os_fallback_upd, r=Mark-S…
matthiaskrgr Jun 24, 2024
b94d275
Rollup merge of #126888 - compiler-errors:oops-debug-printing, r=dtolnay
matthiaskrgr Jun 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/bootstrap/download-ci-llvm-stamp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Change this file to make users of the `download-ci-llvm` configuration download
a new version of LLVM from CI, even if the LLVM submodule hasn’t changed.

Last change is for: https://github.com/rust-lang/rust/pull/125141
Last change is for: https://github.com/rust-lang/rust/pull/126298
1 change: 1 addition & 0 deletions src/bootstrap/src/core/build_steps/llvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ pub(crate) fn is_ci_llvm_available(config: &Config, asserts: bool) -> bool {
("arm-unknown-linux-gnueabihf", false),
("armv7-unknown-linux-gnueabihf", false),
("loongarch64-unknown-linux-gnu", false),
("loongarch64-unknown-linux-musl", false),
("mips-unknown-linux-gnu", false),
("mips64-unknown-linux-gnuabi64", false),
("mips64el-unknown-linux-gnuabi64", false),
Expand Down
16 changes: 16 additions & 0 deletions src/ci/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,22 @@ For targets: `loongarch64-unknown-linux-gnu`
- C compiler > gcc version = 13.2.0
- C compiler > C++ = ENABLE -- to cross compile LLVM

### `loongarch64-linux-musl.defconfig`

For targets: `loongarch64-unknown-linux-musl`

- Path and misc options > Prefix directory = /x-tools/${CT\_TARGET}
- Path and misc options > Use a mirror = ENABLE
- Path and misc options > Base URL = https://ci-mirrors.rust-lang.org/rustc
- Target options > Target Architecture = loongarch
- Target options > Bitness = 64-bit
- Operating System > Target OS = linux
- Operating System > Linux kernel version = 5.19.16
- Binary utilities > Version of binutils = 2.41
- C-library > musl version = 1.2.5
- C compiler > gcc version = 13.2.0
- C compiler > C++ = ENABLE -- to cross compile LLVM

### `mips-linux-gnu.defconfig`

For targets: `mips-unknown-linux-gnu`
Expand Down
35 changes: 35 additions & 0 deletions src/ci/docker/host-x86_64/dist-loongarch64-musl/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM ubuntu:22.04

COPY scripts/cross-apt-packages.sh /scripts/
RUN sh /scripts/cross-apt-packages.sh

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-musl/loongarch64-unknown-linux-musl.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-musl/bin

ENV CC_loongarch64_unknown_linux_musl=loongarch64-unknown-linux-musl-gcc \
AR_loongarch64_unknown_linux_musl=loongarch64-unknown-linux-musl-ar \
CXX_loongarch64_unknown_linux_musl=loongarch64-unknown-linux-musl-g++

ENV HOSTS=loongarch64-unknown-linux-musl

ENV RUST_CONFIGURE_ARGS \
--enable-extended \
--enable-lld \
--disable-docs \
--set target.loongarch64-unknown-linux-musl.crt-static=false \
--musl-root-loongarch64=/x-tools/loongarch64-unknown-linux-musl/loongarch64-unknown-linux-musl/sysroot/usr

ENV SCRIPT python3 ../x.py dist --host $HOSTS --target $HOSTS
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
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_LIBC_MUSL=y
CT_CC_GCC_ENABLE_DEFAULT_PIE=y
CT_CC_LANG_CXX=y
CT_GETTEXT_NEEDED=y
17 changes: 17 additions & 0 deletions src/ci/docker/scripts/crosstool-ng-git.sh
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=c64500d94be92ed1bcdfdef911048a14e216a5e1

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
3 changes: 3 additions & 0 deletions src/ci/github-actions/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ auto:
- image: dist-loongarch64-linux
<<: *job-linux-4c

- image: dist-loongarch64-musl
<<: *job-linux-4c

- image: dist-ohos
<<: *job-linux-4c

Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustc/src/platform-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ target | notes
`arm-unknown-linux-gnueabihf` | Armv6 Linux, hardfloat (kernel 3.2, glibc 2.17)
`armv7-unknown-linux-gnueabihf` | Armv7-A Linux, hardfloat (kernel 3.2, glibc 2.17)
[`loongarch64-unknown-linux-gnu`](platform-support/loongarch-linux.md) | LoongArch64 Linux, LP64D ABI (kernel 5.19, glibc 2.36)
[`loongarch64-unknown-linux-musl`](platform-support/loongarch-linux.md) | LoongArch64 Linux, LP64D ABI (kernel 5.19, musl 1.2.5)
`powerpc-unknown-linux-gnu` | PowerPC Linux (kernel 3.2, glibc 2.17)
`powerpc64-unknown-linux-gnu` | PPC64 Linux (kernel 3.2, glibc 2.17)
`powerpc64le-unknown-linux-gnu` | PPC64LE Linux (kernel 3.10, glibc 2.17)
Expand Down Expand Up @@ -305,7 +306,6 @@ target | std | host | notes
`i686-uwp-windows-msvc` | ✓ | | [^x86_32-floats-return-ABI]
[`i686-win7-windows-msvc`](platform-support/win7-windows-msvc.md) | ✓ | | 32-bit Windows 7 support [^x86_32-floats-return-ABI]
`i686-wrs-vxworks` | ? | | [^x86_32-floats-return-ABI]
[`loongarch64-unknown-linux-musl`](platform-support/loongarch-linux.md) | ? | | LoongArch64 Linux (LP64D ABI) with musl 1.2.3
[`m68k-unknown-linux-gnu`](platform-support/m68k-unknown-linux-gnu.md) | ? | | Motorola 680x0 Linux
`mips-unknown-linux-gnu` | ✓ | ✓ | MIPS Linux (kernel 4.4, glibc 2.23)
`mips-unknown-linux-musl` | ✓ | | MIPS Linux with musl 1.2.3
Expand Down
2 changes: 2 additions & 0 deletions src/tools/build-manifest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ static HOSTS: &[&str] = &[
"i686-pc-windows-msvc",
"i686-unknown-linux-gnu",
"loongarch64-unknown-linux-gnu",
"loongarch64-unknown-linux-musl",
"mips-unknown-linux-gnu",
"mips64-unknown-linux-gnuabi64",
"mips64el-unknown-linux-gnuabi64",
Expand Down Expand Up @@ -106,6 +107,7 @@ static TARGETS: &[&str] = &[
"i686-unknown-redox",
"i686-unknown-uefi",
"loongarch64-unknown-linux-gnu",
"loongarch64-unknown-linux-musl",
"loongarch64-unknown-none",
"loongarch64-unknown-none-softfloat",
"m68k-unknown-linux-gnu",
Expand Down