Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.

Commit

Permalink
use target_cc in dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ThatsNoMoon committed Aug 6, 2022
1 parent 58f7411 commit a9fc57f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ WORKDIR /highlights
COPY ["Cargo.toml", "Cargo.lock", "./"]
RUN cargo fetch ${RUSTTARGET:+--target $RUSTTARGET}
RUN if [[ ! -z "$RUSTTARGET" ]]; then \
export CC=/$MUSLTARGET-cross/bin/$MUSLTARGET-gcc; \
export TARGET_CC=/$MUSLTARGET-cross/bin/$MUSLTARGET-gcc; \
mkdir .cargo && \
echo "[target.$RUSTTARGET]" > .cargo/config.toml && \
echo "linker = \"$CC\"" >> .cargo/config.toml; \
echo "linker = \"$TARGET_CC\"" >> .cargo/config.toml; \
fi; \
cargo build --release ${RUSTTARGET:+--target $RUSTTARGET} && \
rm src/main.rs target/$RUSTTARGET/release/deps/highlights*
COPY ["src", "./src"]
RUN if [[ ! -z "$RUSTTARGET" ]]; then \
export CC=/$MUSLTARGET-cross/bin/$MUSLTARGET-gcc; \
export TARGET_CC=/$MUSLTARGET-cross/bin/$MUSLTARGET-gcc; \
fi; \
cargo build --release ${RUSTTARGET:+--target $RUSTTARGET} && \
if [[ ! -z "$RUSTTARGET" ]]; then \
Expand Down

0 comments on commit a9fc57f

Please sign in to comment.