From 5b0b4ff03c83f03defc3b2a4919aaf5d1ce893ea Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 19 Jul 2024 10:05:30 -0700 Subject: [PATCH 1/2] Update wasi-sdk in CI to latest release This commit updates the `wasi-sdk` download used by the `wasm32-wasi*` targets. The motivation for this commit is generally just "keep things up to date" and is not intended to cause any issues or differences from before, just a routine update. --- src/ci/docker/host-x86_64/dist-various-2/Dockerfile | 4 ++-- src/ci/docker/host-x86_64/test-various/Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ci/docker/host-x86_64/dist-various-2/Dockerfile b/src/ci/docker/host-x86_64/dist-various-2/Dockerfile index 962484593b4be..2621e9a603185 100644 --- a/src/ci/docker/host-x86_64/dist-various-2/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-various-2/Dockerfile @@ -85,9 +85,9 @@ RUN /tmp/build-solaris-toolchain.sh sparcv9 sparcv9 solaris-sparc sun COPY host-x86_64/dist-various-2/build-x86_64-fortanix-unknown-sgx-toolchain.sh /tmp/ RUN /tmp/build-x86_64-fortanix-unknown-sgx-toolchain.sh -RUN curl -L https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-22/wasi-sdk-22.0-linux.tar.gz | \ +RUN curl -L https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-23/wasi-sdk-23.0-x86_64-linux.tar.gz | \ tar -xz -ENV WASI_SDK_PATH=/tmp/wasi-sdk-22.0 +ENV WASI_SDK_PATH=/tmp/wasi-sdk-23.0-x86_64-linux COPY scripts/freebsd-toolchain.sh /tmp/ RUN /tmp/freebsd-toolchain.sh i686 diff --git a/src/ci/docker/host-x86_64/test-various/Dockerfile b/src/ci/docker/host-x86_64/test-various/Dockerfile index f874b2ed475fd..c2f5a87b1234f 100644 --- a/src/ci/docker/host-x86_64/test-various/Dockerfile +++ b/src/ci/docker/host-x86_64/test-various/Dockerfile @@ -40,9 +40,9 @@ WORKDIR / COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh -RUN curl -L https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-22/wasi-sdk-22.0-linux.tar.gz | \ +RUN curl -L https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-23/wasi-sdk-23.0-x86_64-linux.tar.gz | \ tar -xz -ENV WASI_SDK_PATH=/wasi-sdk-22.0 +ENV WASI_SDK_PATH=/wasi-sdk-23.0-x86_64-linux ENV RUST_CONFIGURE_ARGS \ --musl-root-x86_64=/usr/local/x86_64-linux-musl \ From 006c884480d2d0ecf727660cbd6535b0e6479dfd Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 19 Jul 2024 10:27:14 -0700 Subject: [PATCH 2/2] Fix two new failing tests The updated wasi-sdk has debuginfo by default so be sure to strip the debuginfo by default when testing the size of new executables. --- tests/run-make/wasm-panic-small/rmake.rs | 9 ++++++++- tests/run-make/wasm-stringify-ints-small/rmake.rs | 8 +++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/tests/run-make/wasm-panic-small/rmake.rs b/tests/run-make/wasm-panic-small/rmake.rs index 8d0944ed98d5b..e69fbac96356a 100644 --- a/tests/run-make/wasm-panic-small/rmake.rs +++ b/tests/run-make/wasm-panic-small/rmake.rs @@ -13,7 +13,14 @@ fn main() { fn test(cfg: &str) { eprintln!("running cfg {cfg:?}"); - rustc().input("foo.rs").target("wasm32-wasip1").arg("-Clto").opt().cfg(cfg).run(); + rustc() + .input("foo.rs") + .target("wasm32-wasip1") + .arg("-Clto") + .arg("-Cstrip=debuginfo") + .opt() + .cfg(cfg) + .run(); let bytes = rfs::read("foo.wasm"); println!("{}", bytes.len()); diff --git a/tests/run-make/wasm-stringify-ints-small/rmake.rs b/tests/run-make/wasm-stringify-ints-small/rmake.rs index 93eb38b098766..c0448c59c037b 100644 --- a/tests/run-make/wasm-stringify-ints-small/rmake.rs +++ b/tests/run-make/wasm-stringify-ints-small/rmake.rs @@ -4,7 +4,13 @@ use run_make_support::{rfs, rustc}; fn main() { - rustc().input("foo.rs").target("wasm32-wasip1").arg("-Clto").opt().run(); + rustc() + .input("foo.rs") + .target("wasm32-wasip1") + .arg("-Clto") + .arg("-Cstrip=debuginfo") + .opt() + .run(); let bytes = rfs::read("foo.wasm"); println!("{}", bytes.len());