Skip to content

Commit

Permalink
Don't use simd
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-ni committed Jul 18, 2024
1 parent 501d0d3 commit 0c4ad62
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# I will only support x86_64 hosts because this allows for best hardware optimizations.
# Compiling a Dockerfile for aarch64 should work but I won't support it myself.
ARG TARGET_CPU="haswell"
ARG TARGET_CPU="x86-64"

FROM docker.io/library/alpine:edge AS builder
ARG TARGET_CPU
Expand All @@ -20,19 +20,19 @@ RUN mkdir src/
RUN echo 'fn main() {}' > ./src/main.rs
RUN source $HOME/.cargo/env && \
if [ "$TARGET_CPU" == 'x86-64' ]; then \
cargo build --release --target="$RUST_TARGET" --no-default-features --features no-simd; \
cargo build --release --target="$RUST_TARGET" --no-default-features --features no-simd; \
else \
cargo build --release --target="$RUST_TARGET"; \
cargo build --release --target="$RUST_TARGET"; \
fi

RUN rm -f target/$RUST_TARGET/release/deps/gateway_proxy*
COPY ./src ./src

RUN source $HOME/.cargo/env && \
if [ "$TARGET_CPU" == 'x86-64' ]; then \
cargo build --release --target="$RUST_TARGET" --no-default-features --features no-simd; \
cargo build --release --target="$RUST_TARGET" --no-default-features --features no-simd; \
else \
cargo build --release --target="$RUST_TARGET"; \
cargo build --release --target="$RUST_TARGET"; \
fi && \
cp target/$RUST_TARGET/release/gateway-proxy /gateway-proxy && \
strip /gateway-proxy
Expand Down

0 comments on commit 0c4ad62

Please sign in to comment.