Skip to content

Commit 736ac45

Browse files
authored
wasmer: fix build (#10026)
- Updates wasmer to use llvm 14+ - Pinned rust version as it was crashing the build, fix copied from (#10019) Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=56795
1 parent bf6ebb8 commit 736ac45

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

projects/wasmer/Dockerfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,18 @@
1717
FROM gcr.io/oss-fuzz-base/base-builder-rust
1818

1919
RUN apt-get update && apt-get install -y make autoconf automake libtool \
20-
zlib1g-dev libffi-dev build-essential \
21-
clang-12 llvm-12 llvm-12-dev llvm-12-tools
20+
zlib1g-dev libffi-dev build-essential libxml2-dev
21+
22+
# until clang 16 is used for C cf https://github.com/rust-lang/rust/issues/107149#issuecomment-1492637779
23+
RUN rustup install nightly-2023-03-24
24+
RUN rustup component add rust-src --toolchain nightly-2023-03-24-x86_64-unknown-linux-gnu
2225

2326
RUN git clone --depth 1 https://github.com/wasmerio/wasmer wasmer
2427

28+
RUN mkdir -p $SRC/.llvm && curl --proto '=https' --tlsv1.2 -sSf \
29+
https://github.com/wasmerio/llvm-custom-builds/releases/download/14.x/llvm-linux-amd64.tar.xz -L -o - | \
30+
tar xJv -C $SRC/.llvm
31+
2532
WORKDIR wasmer
2633

2734
COPY build.sh default.options $SRC/

projects/wasmer/build.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
#
1616
################################################################################
1717

18-
export LLVM_SYS_120_PREFIX=$(llvm-config-12 --prefix)
18+
# until clang 16 is used for C cf https://github.com/rust-lang/rust/issues/107149#issuecomment-1492637779
19+
rustup default nightly-2023-03-24
20+
21+
export LLVM_SYS_140_PREFIX=$($SRC/.llvm/bin/llvm-config --prefix)
1922

2023
cargo +nightly fuzz build universal_cranelift --features=universal,cranelift -O
2124
cargo +nightly fuzz build universal_llvm --features=universal,llvm -O

0 commit comments

Comments
 (0)