Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion images/Dockerfile.bottlecap.alpine.compile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ RUN --mount=type=cache,target=/root/.cargo/git \
if [ "${PLATFORM}" = "x86_64" ]; then \
# The `libddwaf` crate links against static objects that require `libclang_rt.builtins`, but
# this is not presented to the linker by default on this platform, so we force it in.
export RUSTFLAGS="${RUSTFLAGS:-} -Clinker=clang -L$(dirname $(clang --print-file-name="libclang_rt.builtins-$(uname -m).a")) -lclang_rt.builtins-$(uname -m)"; \
export RUSTFLAGS="${RUSTFLAGS:-} -Clinker=clang -L$(dirname $(clang --print-file-name="libclang_rt.builtins-$(uname -m).a")) -lclang_rt.builtins-$(uname -m) -Clink-arg=-Wl,-z,now -Clink-arg=-Wl,-z,relro"; \
fi; \
# We use a wrapper to allow `libddwaf-sys`' build.rs to be compiled with
# -Ctarget-feature=-crt-static so that it is capable of dynamically loading
Expand Down
2 changes: 1 addition & 1 deletion images/Dockerfile.bottlecap.compile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ RUN --mount=type=cache,target=/usr/local/cargo/git \
fi; \
# The `libddwaf` crate links against static objects that require `libclang_rt.builtins`, but
# this is not presented to the linker by default on this platform, so we force it in.
export RUSTFLAGS="${RUSTFLAGS:-} -Clinker=clang -L$(dirname $(clang --print-file-name="libclang_rt.builtins-$(uname -m).a")) -lclang_rt.builtins-$(uname -m)"; \
export RUSTFLAGS="${RUSTFLAGS:-} -Clinker=clang -L$(dirname $(clang --print-file-name="libclang_rt.builtins-$(uname -m).a")) -lclang_rt.builtins-$(uname -m) -Clink-arg=-Wl,-z,now -Clink-arg=-Wl,-z,relro"; \
cargo +stable build --verbose --locked --no-default-features --features="${FEATURES}" ${BUILD_FLAG} && \
mkdir -p /tmp/out && cp "/tmp/dd/bottlecap/target/${BUILD_MODE}/bottlecap" /tmp/out/bottlecap

Expand Down
Loading