From c1943465fc9ac2e93cdfa99cff913a58aaf5c68e Mon Sep 17 00:00:00 2001 From: Paul Gey Date: Tue, 27 May 2025 22:47:31 +0200 Subject: [PATCH 1/2] [miri] install `rust-src` component to be able to build the miri sysroot --- miri/build.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/miri/build.sh b/miri/build.sh index 60c1e4a..a97e22d 100755 --- a/miri/build.sh +++ b/miri/build.sh @@ -32,6 +32,11 @@ RUST=/opt/compiler-explorer/rust-miri-${VERSION} mv /opt/compiler-explorer/rust-nightly ${RUST} +# install standard library sources +curl --proto '=https' --tlsv1.2 -sSf https://static.rust-lang.org/dist/rust-src-nightly.tar.gz \ + | tar zxf - +./rust-src-nightly/install.sh --prefix=${RUST} --verbose + # put `rustup` on `$PATH` source .cargo/env @@ -44,4 +49,7 @@ for manifest_path in ${RUST}/lib/rustlib/manifest-rust-std-*; do cargo miri setup --target=${manifest_path#*/manifest-rust-std-} --verbose done +# remove standard library sources again -- we don’t need them any more +rm -rf ${RUST}/lib/rustlib/src + complete "${RUST}" "rust-miri-${VERSION}" "${OUTPUT}" From 1d47ec07f2633122f939fe90950f8d4d991b8be9 Mon Sep 17 00:00:00 2001 From: Paul Gey Date: Tue, 27 May 2025 23:01:21 +0200 Subject: [PATCH 2/2] [miri] remove entire standard library --- miri/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miri/build.sh b/miri/build.sh index a97e22d..4dac7c4 100755 --- a/miri/build.sh +++ b/miri/build.sh @@ -49,7 +49,7 @@ for manifest_path in ${RUST}/lib/rustlib/manifest-rust-std-*; do cargo miri setup --target=${manifest_path#*/manifest-rust-std-} --verbose done -# remove standard library sources again -- we don’t need them any more -rm -rf ${RUST}/lib/rustlib/src +# remove standard library -- we don’t need it any more +rm -rf ${RUST}/lib/rustlib complete "${RUST}" "rust-miri-${VERSION}" "${OUTPUT}"