about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorJayden Qi <jaydeniqv2@gmail.com>2025-03-14 18:40:11 -0700
committerJayden Qi <jaydeniqv2@gmail.com>2025-06-30 13:46:12 -0700
commite2d2926e6840294fe2e0b1a72d162e8d9facf8ea (patch)
tree88a732e0a541ac34b6950e306ad83f44ae473fdc /src
parent7804d949dfcc32003dfd5412b44066d3546e4299 (diff)
downloadrust-e2d2926e6840294fe2e0b1a72d162e8d9facf8ea.tar.gz
rust-e2d2926e6840294fe2e0b1a72d162e8d9facf8ea.zip
fix: install correct cc for wasm32-unknown-emscripten
Also fixed a typo in the sanity check for bootstrap, as we are checking for clang-likeness in every wasm target.
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/src/core/sanity.rs2
-rw-r--r--src/ci/docker/host-x86_64/dist-various-1/Dockerfile9
-rwxr-xr-xsrc/ci/docker/host-x86_64/dist-various-1/install-emscripten.sh12
3 files changed, 22 insertions, 1 deletions
diff --git a/src/bootstrap/src/core/sanity.rs b/src/bootstrap/src/core/sanity.rs
index fa6987d4bf5..37b2d782931 100644
--- a/src/bootstrap/src/core/sanity.rs
+++ b/src/bootstrap/src/core/sanity.rs
@@ -329,7 +329,7 @@ than building it.
             .or_insert_with(|| Target::from_triple(&target.triple));
 
         // compiler-rt c fallbacks for wasm cannot be built with gcc
-        if target.contains("wasm") // bare metal targets without wasi sdk
+        if target.contains("wasm")
             && (build.config.optimized_compiler_builtins(*target)
                 || build.config.rust_std_features.contains("compiler-builtins-c"))
         {
diff --git a/src/ci/docker/host-x86_64/dist-various-1/Dockerfile b/src/ci/docker/host-x86_64/dist-various-1/Dockerfile
index 5c459e5cd18..1e45ef45c9b 100644
--- a/src/ci/docker/host-x86_64/dist-various-1/Dockerfile
+++ b/src/ci/docker/host-x86_64/dist-various-1/Dockerfile
@@ -55,6 +55,15 @@ RUN ./install-riscv64-none-elf.sh
 COPY host-x86_64/dist-various-1/install-riscv32-none-elf.sh /build
 RUN ./install-riscv32-none-elf.sh
 
+COPY host-x86_64/dist-various-1/install-llvm-mingw.sh /build
+RUN ./install-llvm-mingw.sh
+
+COPY host-x86_64/dist-various-1/install-emscripten.sh /build
+RUN ./install-emscripten.sh
+
+# Add Emscripten to PATH
+ENV PATH="/build/emsdk:/build/emsdk/upstream/emscripten:/build/emsdk/node/current/bin:${PATH}"
+
 # Suppress some warnings in the openwrt toolchains we downloaded
 ENV STAGING_DIR=/tmp
 
diff --git a/src/ci/docker/host-x86_64/dist-various-1/install-emscripten.sh b/src/ci/docker/host-x86_64/dist-various-1/install-emscripten.sh
new file mode 100755
index 00000000000..eeb54ca67f7
--- /dev/null
+++ b/src/ci/docker/host-x86_64/dist-various-1/install-emscripten.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+set -ex
+
+apt-get update
+apt-get install -y --no-install-recommends \
+  nodejs \
+  default-jre
+
+git clone https://github.com/emscripten-core/emsdk.git
+cd emsdk
+./emsdk install latest
+./emsdk activate latest