diff options
Diffstat (limited to 'devel/rust')
| -rw-r--r-- | devel/rust/.footprint | 130 | ||||
| -rw-r--r-- | devel/rust/.signature | 12 | ||||
| -rw-r--r-- | devel/rust/MAKEPKG | 115 | ||||
| -rw-r--r-- | devel/rust/libressl-openssl-sys.patch | 11 | ||||
| -rw-r--r-- | devel/rust/musl-no-crt-static.patch | 17 | ||||
| -rw-r--r-- | devel/rust/system.diff | 119 |
6 files changed, 404 insertions, 0 deletions
diff --git a/devel/rust/.footprint b/devel/rust/.footprint new file mode 100644 index 0000000..93909e0 --- /dev/null +++ b/devel/rust/.footprint @@ -0,0 +1,130 @@ +drwxr-xr-x root/root etc/ +-rw-r--r-- root/root etc/target-spec-json-schema.json +drwxr-xr-x root/root etc/bash_completion.d/ +-rw-r--r-- root/root etc/bash_completion.d/cargo +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/cargo +-rwxr-xr-x root/root usr/bin/cargo-clippy +-rwxr-xr-x root/root usr/bin/cargo-fmt +-rwxr-xr-x root/root usr/bin/clippy-driver +-rwxr-xr-x root/root usr/bin/rust-analyzer +-rwxr-xr-x root/root usr/bin/rust-gdb +-rwxr-xr-x root/root usr/bin/rust-gdbgui +-rwxr-xr-x root/root usr/bin/rust-lldb +-rwxr-xr-x root/root usr/bin/rustc +-rwxr-xr-x root/root usr/bin/rustfmt +drwxr-xr-x root/root usr/lib/ +-rw-r--r-- root/root usr/lib/librustc_driver-b9f2c69a3a486936.so +drwxr-xr-x root/root usr/lib/rustlib/ +drwxr-xr-x root/root usr/lib/rustlib/etc/ +-rw-r--r-- root/root usr/lib/rustlib/etc/gdb_load_rust_pretty_printers.py +-rw-r--r-- root/root usr/lib/rustlib/etc/gdb_lookup.py +-rw-r--r-- root/root usr/lib/rustlib/etc/gdb_providers.py +-rw-r--r-- root/root usr/lib/rustlib/etc/lldb_lookup.py +-rw-r--r-- root/root usr/lib/rustlib/etc/lldb_providers.py +-rw-r--r-- root/root usr/lib/rustlib/etc/rust_types.py +drwxr-xr-x root/root usr/lib/rustlib/x86_64-unknown-linux-musl/ +drwxr-xr-x root/root usr/lib/rustlib/x86_64-unknown-linux-musl/bin/ +-rwxr-xr-x root/root usr/lib/rustlib/x86_64-unknown-linux-musl/bin/rust-objcopy +drwxr-xr-x root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/ +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libaddr2line-04309e3321feac2e.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libaddr2line-04309e3321feac2e.rmeta +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libadler2-e7a257fc8fa70e87.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libadler2-e7a257fc8fa70e87.rmeta +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/liballoc-55b53cf36909627a.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/liballoc-55b53cf36909627a.rmeta +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libcfg_if-40ed91bbeb11c0cd.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libcfg_if-40ed91bbeb11c0cd.rmeta +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libcompiler_builtins-e9aeee41d3044450.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libcompiler_builtins-e9aeee41d3044450.rmeta +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libcore-52d1f2710efb5c01.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libcore-52d1f2710efb5c01.rmeta +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libgetopts-4893bd0c8a37865a.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libgetopts-4893bd0c8a37865a.rmeta +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libgimli-0b41e9b8d56a8d78.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libgimli-0b41e9b8d56a8d78.rmeta +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libhashbrown-31cf12c5333f0870.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libhashbrown-31cf12c5333f0870.rmeta +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/liblibc-dd9f0ef6ec370429.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/liblibc-dd9f0ef6ec370429.rmeta +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libmemchr-1bf575de44910718.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libmemchr-1bf575de44910718.rmeta +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libminiz_oxide-4df77c42bcda641d.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libminiz_oxide-4df77c42bcda641d.rmeta +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libobject-b2f65bdf08f1c8d3.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libobject-b2f65bdf08f1c8d3.rmeta +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libpanic_abort-66be4a8c3292b908.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libpanic_abort-66be4a8c3292b908.rmeta +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libpanic_unwind-3b52d6faae7ede3b.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libpanic_unwind-3b52d6faae7ede3b.rmeta +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libproc_macro-4d5507e8393bc959.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libproc_macro-4d5507e8393bc959.rmeta +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_demangle-321eb866de0fba43.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_demangle-321eb866de0fba43.rmeta +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_literal_escaper-7f2be8f99c9e2b39.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_literal_escaper-7f2be8f99c9e2b39.rmeta +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_std_workspace_alloc-3ceab45d4cdffb25.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_std_workspace_alloc-3ceab45d4cdffb25.rmeta +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_std_workspace_core-52d4e954625492f4.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_std_workspace_core-52d4e954625492f4.rmeta +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_std_workspace_std-6eab92f92d36ad30.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_std_workspace_std-6eab92f92d36ad30.rmeta +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libstd-e2ffae946518c1c7.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libstd-e2ffae946518c1c7.rmeta +-rwxr-xr-x root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libstd-e2ffae946518c1c7.so +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libstd_detect-b3cbae553fa96c13.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libstd_detect-b3cbae553fa96c13.rmeta +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libsysroot-81f65d389e11fc9f.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libsysroot-81f65d389e11fc9f.rmeta +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libtest-1246116d241263a0.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libtest-1246116d241263a0.rmeta +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libunwind-9c74c351896edb59.rlib +-rw-r--r-- root/root usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libunwind-9c74c351896edb59.rmeta +drwxr-xr-x root/root usr/libexec/ +-rwxr-xr-x root/root usr/libexec/rust-analyzer-proc-macro-srv +drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/man/ +drwxr-xr-x root/root usr/share/man/man1/ +-rw-r--r-- root/root usr/share/man/man1/cargo-add.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-bench.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-build.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-check.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-clean.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-doc.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-fetch.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-fix.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-generate-lockfile.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-help.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-info.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-init.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-install.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-locate-project.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-login.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-logout.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-metadata.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-new.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-owner.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-package.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-pkgid.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-publish.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-remove.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-report-future-incompatibilities.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-report.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-run.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-rustc.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-rustdoc.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-search.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-test.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-tree.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-uninstall.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-update.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-vendor.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-version.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo-yank.1.gz +-rw-r--r-- root/root usr/share/man/man1/cargo.1.gz +-rw-r--r-- root/root usr/share/man/man1/rustc.1.gz +-rw-r--r-- root/root usr/share/man/man1/rustdoc.1.gz +drwxr-xr-x root/root usr/share/zsh/ +drwxr-xr-x root/root usr/share/zsh/site-functions/ +-rw-r--r-- root/root usr/share/zsh/site-functions/_cargo diff --git a/devel/rust/.signature b/devel/rust/.signature new file mode 100644 index 0000000..d183b6c --- /dev/null +++ b/devel/rust/.signature @@ -0,0 +1,12 @@ +RWTZ9IduCSQ/mH3Y8VD4mk1DtZ+fuY5D4LXmVnOEDJrxGZYbdIWEplFMb9qfqe1swXV85weV1ob4fZRD8CbbfVhFQjOejP0R5gI= + +SHA256 (MAKEPKG) = 4d594d1be12c9cbe48175bd85d141f40e2defd12c9436e1477da8151a5b41db2 +SHA256 (.footprint) = 45d84e9ea615f0e0158c5f7c0392a1d79944a67a4daeeaf65c1f5e839583da2f +SHA256 (rustc-1.98.1-src.tar.xz) = be1816e7f6c40abb90245ad6e024bed2a7e88d7dda4561e4d5470207df616b9f +SHA256 (rust-std-1.97.1-x86_64-unknown-linux-musl.tar.xz) = 51d83178680556f73a5fa8ad865b76a1ff541867445c00fc65dc67246bc2de66 +SHA256 (rustc-1.97.1-x86_64-unknown-linux-musl.tar.xz) = 1b1f926d3b5bf8036c858180dbc9518c6c317154718ee5c5460bb23d23bacf5d +SHA256 (cargo-1.97.1-x86_64-unknown-linux-musl.tar.xz) = 623a1315bdbddc5e7a807aaf7e1911d1435a294758e170b8758f49fc57a3e67c +SHA256 (system.diff) = c812b442131f53a6a614cba20bcd007ab0eee8583bd423d75038b90ebc87f323 +SHA256 (musl-no-crt-static.patch) = 8b7d3beb08cc22a4477b238eff22d91b249ea4c5344911f6fc3c279342538e35 +SHA256 (libressl-openssl-sys.patch) = 0e5cd25e3680e75494b9d58783106723a97ef74bf70c9237bbb088fbc948a5d2 +SHA256 (rust#1.98.1-2.pkg.tar.gz) = 389080fecec36d286d6bd5a905cb1f86e31af6f98797af92433d4a46265c064f diff --git a/devel/rust/MAKEPKG b/devel/rust/MAKEPKG new file mode 100644 index 0000000..6de018b --- /dev/null +++ b/devel/rust/MAKEPKG @@ -0,0 +1,115 @@ +#!/bin/mkpkg +# description: Rust programming language +# url: https://www.rust-lang.org/ +# https://releases.rs/docs/1.98.0/ + +name=rust +version=1.98.1 +_bootstrap=1.97.1 +_date=2026-07-16 +release=2 +depends=(llvm) +makedeps=(cmake ninja python3 gcc-compat) +source=( + https://static.rust-lang.org/dist/rustc-$version-src.tar.xz + https://static.rust-lang.org/dist/$_date/rust-std-$_bootstrap-x86_64-unknown-linux-musl.tar.xz + https://static.rust-lang.org/dist/$_date/rustc-$_bootstrap-x86_64-unknown-linux-musl.tar.xz + https://static.rust-lang.org/dist/$_date/cargo-$_bootstrap-x86_64-unknown-linux-musl.tar.xz + system.diff + musl-no-crt-static.patch + libressl-openssl-sys.patch +) + +sha256sums=( + "be1816e7f6c40abb90245ad6e024bed2a7e88d7dda4561e4d5470207df616b9f" + "51d83178680556f73a5fa8ad865b76a1ff541867445c00fc65dc67246bc2de66" + "1b1f926d3b5bf8036c858180dbc9518c6c317154718ee5c5460bb23d23bacf5d" + "623a1315bdbddc5e7a807aaf7e1911d1435a294758e170b8758f49fc57a3e67c" + "c812b442131f53a6a614cba20bcd007ab0eee8583bd423d75038b90ebc87f323" + "8b7d3beb08cc22a4477b238eff22d91b249ea4c5344911f6fc3c279342538e35" + "0e5cd25e3680e75494b9d58783106723a97ef74bf70c9237bbb088fbc948a5d2" +) + +extract() { + cp system.diff $SRC/ + cp musl-no-crt-static.patch $SRC/ + cp libressl-openssl-sys.patch $SRC/ + tar -xf $PKGMK_SOURCE_DIR/rustc-$version-src.tar.xz -C $SRC + + mkdir -p $SRC/rustc-$version-src/build/cache/$_date + cp rust-std-$_bootstrap-x86_64-unknown-linux-musl.tar.xz $SRC/rustc-$version-src/build/cache/$_date/ + cp rustc-$_bootstrap-x86_64-unknown-linux-musl.tar.xz $SRC/rustc-$version-src/build/cache/$_date/ + cp cargo-$_bootstrap-x86_64-unknown-linux-musl.tar.xz $SRC/rustc-$version-src/build/cache/$_date/ +} + +patch() { + cd rustc-$version-src + patch -p1 -i $SRC/system.diff + patch -p1 -i $SRC/musl-no-crt-static.patch + patch -p1 -i $SRC/libressl-openssl-sys.patch + + # LLVM 23 dropped X86 FeatureAMXTF32 (Intel removed AMX-TF32 from the ISA). + # rustc 1.98 still probes it via LLVMRustHasFeature(), now fatal, and + # core_arch still defines the intrinsics. Fixed upstream in + # rust-lang/rust#159310, landing in 1.99.0. + sed -i '/"amx-tf32"/d' compiler/rustc_target/src/target_features.rs + sed -i '/amx.tf32/Id' library/std_detect/src/detect/arch/x86.rs + sed -i '/amx_tf32/d' library/std_detect/src/detect/os/x86.rs + sed -i '/amx-tf32/d' library/std_detect/tests/x86-specific.rs + sed -i '\%^/// Perform matrix multiplication of two tiles a and b, containing packed single precision%,/^}$/d' \ + library/stdarch/crates/core_arch/src/x86_64/amx.rs + sed -i '/llvm\.x86\.tmmultf32ps/,+1d' \ + library/stdarch/crates/core_arch/src/x86_64/amx.rs +} + +build() { + cd rustc-$version-src + + cat > bootstrap.toml <<EOF +change-id = "ignore" +[llvm] +link-shared = true +use-libcxx = true +static-libstdcpp = false +[build] +build = "x86_64-unknown-linux-musl" +host = ["x86_64-unknown-linux-musl"] +target = ["x86_64-unknown-linux-musl"] +docs = false +extended = true +tools = ["cargo", "rustfmt", "clippy", "rust-analyzer"] +vendor = true +[install] +prefix = "/usr" +[rust] +channel = "stable" +codegen-units = 1 +lto = "off" +llvm-libunwind = "system" +[target.x86_64-unknown-linux-musl] +llvm-config = "/usr/bin/llvm-config" +crt-static = false +cc = "clang" +cxx = "clang++" +ar = "llvm-ar" +ranlib = "llvm-ranlib" +linker = "clang" +rustflags = ["-C", "link-arg=-lunwind"] +EOF + python3 x.py build + DESTDIR=$PKG python3 x.py install + + rm -rf $PKG/usr/share/doc + rm -f $PKG/usr/lib/rustlib/install.log + rm -f $PKG/usr/lib/rustlib/uninstall.sh + rm -f $PKG/usr/lib/rustlib/manifest-* + rm -f $PKG/usr/lib/rustlib/components + rm -f $PKG/usr/lib/rustlib/rust-installer-version +} + +signify() { + untrusted comment: public key + RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3 +} + +# vim: filetype=sh diff --git a/devel/rust/libressl-openssl-sys.patch b/devel/rust/libressl-openssl-sys.patch new file mode 100644 index 0000000..ff53635 --- /dev/null +++ b/devel/rust/libressl-openssl-sys.patch @@ -0,0 +1,11 @@ +--- a/vendor/openssl-sys-0.9.114/build/main.rs ++++ b/vendor/openssl-sys-0.9.114/build/main.rs +@@ -429,6 +429,7 @@ + (4, 1, 0) => ('4', '1', '0'), + (4, 1, _) => ('4', '1', 'x'), + (4, 2, _) => ('4', '2', 'x'), + (4, 3, _) => ('4', '3', 'x'), ++ (_, _, _) => ('x', 'x', 'x'), + _ => version_error(), + }; + diff --git a/devel/rust/musl-no-crt-static.patch b/devel/rust/musl-no-crt-static.patch new file mode 100644 index 0000000..7e91ea2 --- /dev/null +++ b/devel/rust/musl-no-crt-static.patch @@ -0,0 +1,17 @@ +--- a/compiler/rustc_target/src/spec/base/linux_musl.rs ++++ b/compiler/rustc_target/src/spec/base/linux_musl.rs +@@ -1,11 +1,10 @@ +-use crate::spec::{Env, LinkSelfContainedDefault, TargetOptions, base, crt_objects}; ++use crate::spec::{Env, TargetOptions, base}; + + pub(crate) fn opts() -> TargetOptions { + TargetOptions { + env: Env::Musl, +- pre_link_objects_self_contained: crt_objects::pre_musl_self_contained(), +- post_link_objects_self_contained: crt_objects::post_musl_self_contained(), +- link_self_contained: LinkSelfContainedDefault::InferredForMusl, ++ crt_static_default: false, ++ crt_static_allows_dylibs: true, + ..base::linux::opts() + } + } diff --git a/devel/rust/system.diff b/devel/rust/system.diff new file mode 100644 index 0000000..0fb21ce --- /dev/null +++ b/devel/rust/system.diff @@ -0,0 +1,119 @@ +diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs +index 2d84e78f..0f4d75ea 100644 +--- a/compiler/rustc_target/src/spec/crt_objects.rs ++++ b/compiler/rustc_target/src/spec/crt_objects.rs +@@ -62,6 +62,7 @@ pub(super) fn all(obj: &'static str) -> CrtObjects { + ]) + } + ++#[allow(dead_code)] + pub(super) fn pre_musl_self_contained() -> CrtObjects { + new(&[ + (LinkOutputKind::DynamicNoPicExe, &["crt1.o", "crti.o", "crtbegin.o"]), +@@ -73,6 +74,7 @@ pub(super) fn pre_musl_self_contained() -> CrtObjects { + ]) + } + ++#[allow(dead_code)] + pub(super) fn post_musl_self_contained() -> CrtObjects { + new(&[ + (LinkOutputKind::DynamicNoPicExe, &["crtend.o", "crtn.o"]), +diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs +index 02940a80..d5a6de33 100644 +--- a/src/bootstrap/src/core/build_steps/compile.rs ++++ b/src/bootstrap/src/core/build_steps/compile.rs +@@ -375,54 +375,7 @@ fn copy_self_contained_objects( + t!(fs::create_dir_all(&libdir_self_contained)); + let mut target_deps = vec![]; + +- // Copies the libc and CRT objects. +- // +- // rustc historically provides a more self-contained installation for musl targets +- // not requiring the presence of a native musl toolchain. For example, it can fall back +- // to using gcc from a glibc-targeting toolchain for linking. +- // To do that we have to distribute musl startup objects as a part of Rust toolchain +- // and link with them manually in the self-contained mode. +- if target.needs_crt_begin_end() { +- let srcdir = builder.musl_libdir(target).unwrap_or_else(|| { +- panic!("Target {:?} does not have a \"musl-libdir\" key", target.triple) +- }); +- if !target.starts_with("wasm32") { +- for &obj in &["libc.a", "crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] { +- copy_and_stamp( +- builder, +- &libdir_self_contained, +- &srcdir, +- obj, +- &mut target_deps, +- DependencyType::TargetSelfContained, +- ); +- } +- let crt_path = builder.ensure(llvm::CrtBeginEnd { target }); +- for &obj in &["crtbegin.o", "crtbeginS.o", "crtend.o", "crtendS.o"] { +- let src = crt_path.join(obj); +- let target = libdir_self_contained.join(obj); +- builder.copy_link(&src, &target, FileType::NativeLibrary); +- target_deps.push((target, DependencyType::TargetSelfContained)); +- } +- } else { +- // For wasm32 targets, we need to copy the libc.a and crt1-command.o files from the +- // musl-libdir, but we don't need the other files. +- for &obj in &["libc.a", "crt1-command.o"] { +- copy_and_stamp( +- builder, +- &libdir_self_contained, +- &srcdir, +- obj, +- &mut target_deps, +- DependencyType::TargetSelfContained, +- ); +- } +- } +- if !target.starts_with("s390x") { +- let libunwind_path = copy_llvm_libunwind(builder, target, &libdir_self_contained); +- target_deps.push((libunwind_path, DependencyType::TargetSelfContained)); +- } +- } else if target.contains("-wasi") { ++ if target.contains("-wasi") { + let srcdir = builder.wasi_libdir(target).unwrap_or_else(|| { + panic!( + "Target {:?} does not have a \"wasi-root\" key in bootstrap.toml \ +diff --git a/src/bootstrap/src/core/sanity.rs b/src/bootstrap/src/core/sanity.rs +index 50d81540..3818e081 100644 +--- a/src/bootstrap/src/core/sanity.rs ++++ b/src/bootstrap/src/core/sanity.rs +@@ -367,22 +367,6 @@ than building it. + continue; + } + +- // Make sure musl-root is valid. +- if target.contains("musl") && !target.contains("unikraft") { +- match build.musl_libdir(*target) { +- Some(libdir) => { +- if fs::metadata(libdir.join("libc.a")).is_err() { +- panic!("couldn't find libc.a in musl libdir: {}", libdir.display()); +- } +- } +- None => panic!( +- "when targeting MUSL either the rust.musl-root \ +- option or the target.$TARGET.musl-root option must \ +- be specified in bootstrap.toml" +- ), +- } +- } +- + if need_cmake && target.is_msvc() { + // There are three builds of cmake on windows: MSVC, MinGW, and + // Cygwin. The Cygwin build does not have generators for Visual +diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs +index a31eb0c1..b941b0b1 100644 +--- a/src/bootstrap/src/lib.rs ++++ b/src/bootstrap/src/lib.rs +@@ -261,6 +261,7 @@ pub struct Build { + step_graph: std::cell::RefCell<crate::utils::step_graph::StepGraph>, + } + ++#[allow(dead_code)] + #[derive(Debug, Clone)] + struct Crate { + name: String, |
