Skip to content

Commit e2d2926

Browse files
committed
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.
1 parent 7804d94 commit e2d2926

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

src/bootstrap/src/core/sanity.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ than building it.
329329
.or_insert_with(|| Target::from_triple(&target.triple));
330330

331331
// compiler-rt c fallbacks for wasm cannot be built with gcc
332-
if target.contains("wasm") // bare metal targets without wasi sdk
332+
if target.contains("wasm")
333333
&& (build.config.optimized_compiler_builtins(*target)
334334
|| build.config.rust_std_features.contains("compiler-builtins-c"))
335335
{

src/ci/docker/host-x86_64/dist-various-1/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ RUN ./install-riscv64-none-elf.sh
5555
COPY host-x86_64/dist-various-1/install-riscv32-none-elf.sh /build
5656
RUN ./install-riscv32-none-elf.sh
5757

58+
COPY host-x86_64/dist-various-1/install-llvm-mingw.sh /build
59+
RUN ./install-llvm-mingw.sh
60+
61+
COPY host-x86_64/dist-various-1/install-emscripten.sh /build
62+
RUN ./install-emscripten.sh
63+
64+
# Add Emscripten to PATH
65+
ENV PATH="/build/emsdk:/build/emsdk/upstream/emscripten:/build/emsdk/node/current/bin:${PATH}"
66+
5867
# Suppress some warnings in the openwrt toolchains we downloaded
5968
ENV STAGING_DIR=/tmp
6069

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
set -ex
3+
4+
apt-get update
5+
apt-get install -y --no-install-recommends \
6+
nodejs \
7+
default-jre
8+
9+
git clone https://github.com/emscripten-core/emsdk.git
10+
cd emsdk
11+
./emsdk install latest
12+
./emsdk activate latest

0 commit comments

Comments
 (0)