Skip to content

Commit 0db9630

Browse files
committed
build: compile Firecracker with retpoline
Add rustc features retpoline-indirect-branches and retpoline-indirect-calls to compile Firecracker itself with retpoline mitigations for Spectre attacks Signed-off-by: Babis Chalios <[email protected]>
1 parent d974044 commit 0db9630

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ fi
133133

134134
say "Building version=$VERSION, profile=$PROFILE, target=$CARGO_TARGET, Rust toolchain=${RUST_TOOLCHAIN}..."
135135
# shellcheck disable=SC2086
136-
cargo build --target "$CARGO_TARGET" $CARGO_OPTS --workspace --bins --examples
136+
RUSTFLAGS="-C target-feature=+retpoline-indirect-branches,+retpoline-indirect-calls" cargo build --target "$CARGO_TARGET" $CARGO_OPTS --workspace --bins --examples
137137

138138
# Only strip in release mode
139139
if [ "$PROFILE" = "release" ]; then

0 commit comments

Comments
 (0)