Skip to content

Commit

Permalink
chore: only optimize for amd64
Browse files Browse the repository at this point in the history
  • Loading branch information
lklimek committed Dec 4, 2024
1 parent 253c4b3 commit 8f7431b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,14 @@ RUN <<EOS
echo 'source $HOME/.cargo/env' >> /root/env

# Enable gcc / g++ optimizations
if [[ "${CARGO_BUILD_PROFILE}" == "release" ]] ; then
echo "export CFLAGS=-march=haswell" >> /root/env
echo "export CXXFLAGS=-march=haswell" >> /root/env
if [[ "$TARGETARCH" == "amd64" ]] ; then
if [[ "${CARGO_BUILD_PROFILE}" == "release" ]] ; then
echo "export CFLAGS=-march=haswell" >> /root/env
echo "export CXXFLAGS=-march=haswell" >> /root/env
else
echo "export CFLAGS=-march=x86-64" >> /root/env
echo "export CXXFLAGS=-march=x86-64" >> /root/env
fi
fi
EOS

Expand Down

0 comments on commit 8f7431b

Please sign in to comment.