Auto merge of #44779 - tjkirch:master, r=alexcrichton
Add aarch64-unknown-linux-musl target This adds support for the aarch64-unknown-linux-musl target in the build and CI systems. This addresses half of issue #42520. The new file `aarch64_unknown_linux_musl.rs` is a copy of `aarch64_unknown_linux_gnu.rs` with "gnu" replaced by "musl", and the added logic in `build-arm-musl.sh` is similarly a near-copy of the arches around it, so overall the changes were straightforward. Testing: ``` $ sudo ./src/ci/docker/run.sh cross ... Dist std stage2 (x86_64-unknown-linux-gnu -> aarch64-unknown-linux-musl) Building stage2 test artifacts (x86_64-unknown-linux-gnu -> aarch64-unknown-linux-musl) Compiling getopts v0.2.14 Compiling term v0.0.0 (file:///checkout/src/libterm) Compiling test v0.0.0 (file:///checkout/src/libtest) Finished release [optimized] target(s) in 16.91 secs Copying stage2 test from stage2 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / aarch64-unknown-linux-musl) ... Build completed successfully in 0:55:22 ``` ``` $ rustup toolchain link local obj/build/x86_64-unknown-linux-gnu/stage2 $ rustup default local ``` After setting the local toolchain as default, and adding this in ~/.cargo/config: ``` [target.aarch64-unknown-linux-musl] linker = "aarch64-linux-musl-gcc" ``` ...then the toolchain was able to build a working ripgrep as a test: ``` $ readelf -a target/aarch64-unknown-linux-musl/debug/rg | grep -i interpreter $ readelf -a target/aarch64-unknown-linux-musl/debug/rg | grep NEEDED $ file target/aarch64-unknown-linux-musl/debug/rg target/aarch64-unknown-linux-musl/debug/rg: ELF 64-bit LSB executable, ARM aarch64, version 1 (GNU/Linux), statically linked, BuildID[sha1]=be11036b0988fac5dccc9f6487eb780b05186582, not stripped ```
Showing
想要评论请 注册 或 登录