Skip to content

Commit

Permalink
build: use elfx86exts to check CPU flags
Browse files Browse the repository at this point in the history
  • Loading branch information
lklimek committed Dec 3, 2024
1 parent 348963b commit ba93ff4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .cargo/config-release.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@ rustflags = ["-C", "target-feature=-crt-static"]
[target.x86_64-unknown-linux-musl]
rustflags = ["-C", "target-feature=-crt-static", "-C", "target-cpu=haswell"]

[target.x86_64-unknown-linux-gnu]
rustflags = ["-C", "target-feature=-crt-static", "-C", "target-cpu=haswell"]

[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,14 @@ RUN --mount=type=secret,id=AWS \
--no-track \
--no-confirm

RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOME}/registry/index \
--mount=type=cache,sharing=shared,id=cargo_registry_cache,target=${CARGO_HOME}/registry/cache \
--mount=type=cache,sharing=shared,id=cargo_git,target=${CARGO_HOME}/git/db \
--mount=type=secret,id=AWS \
set -ex; \
source /root/env && \
cargo install https://github.com/pkgw/[email protected] --locked && \
cargo clean

#
# Rust build planner to speed up builds
Expand Down Expand Up @@ -584,6 +592,8 @@ VOLUME /var/log/dash

# Double-check that we don't have missing deps
RUN ldd /usr/bin/drive-abci
# See what CPU capabilities are required
RUN elfx86exts /usr/bin/drive-abci

#
# Create new non-root user
Expand Down

0 comments on commit ba93ff4

Please sign in to comment.