Skip to content

Commit 2d252e4

Browse files
committed
Fix antithesis docker builds (#3380)
## Issue Addressed The antithesis Docker builds starting failing once we made our MSRV later than 1.58. It seems like it was because there is a new "LLVM pass manager" used by rust by default in more recent versions. Adding a new flag disables usage of the new pass manager and allows builds to pass. This adds a single flag to the antithesis `Dockerfile.libvoidstar`: `RUSTFLAGS="-Znew-llvm-pass-manager=no"`. But this flag requires us to use `nightly` so it also adds that, pinning to an arbitrary recent date. Co-authored-by: realbigsean <[email protected]>
1 parent dfe34ad commit 2d252e4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

testing/antithesis/Dockerfile.libvoidstar

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ FROM rust:1.62.1-bullseye AS builder
22
RUN apt-get update && apt-get -y upgrade && apt-get install -y cmake libclang-dev
33
COPY . lighthouse
44

5-
# build lighthouse directly with a cargo build command, bypassing the makefile
6-
RUN cd lighthouse && LD_LIBRARY_PATH=/lighthouse/testing/antithesis/libvoidstar/ RUSTFLAGS="-Cpasses=sancov -Cllvm-args=-sanitizer-coverage-level=3 -Cllvm-args=-sanitizer-coverage-trace-pc-guard -Ccodegen-units=1 -Cdebuginfo=2 -L/lighthouse/testing/antithesis/libvoidstar/ -lvoidstar" cargo build --release --manifest-path lighthouse/Cargo.toml --target x86_64-unknown-linux-gnu --features modern --verbose --bin lighthouse
5+
# Build lighthouse directly with a cargo build command, bypassing the Makefile.
6+
# We have to use nightly in order to disable the new LLVM pass manager.
7+
RUN rustup default nightly-2022-07-26 && cd lighthouse && LD_LIBRARY_PATH=/lighthouse/testing/antithesis/libvoidstar/ RUSTFLAGS="-Znew-llvm-pass-manager=no -Cpasses=sancov -Cllvm-args=-sanitizer-coverage-level=3 -Cllvm-args=-sanitizer-coverage-trace-pc-guard -Ccodegen-units=1 -Cdebuginfo=2 -L/lighthouse/testing/antithesis/libvoidstar/ -lvoidstar" cargo build --release --manifest-path lighthouse/Cargo.toml --target x86_64-unknown-linux-gnu --features modern --verbose --bin lighthouse
78

89
# build lcli binary directly with cargo install command, bypassing the makefile
910
RUN cargo install --path /lighthouse/lcli --force --locked

0 commit comments

Comments
 (0)