Skip to content

Commit 95545a5

Browse files
author
Claudio Raimondi
committed
Replace config.toml with ENV vars [skip ci]
1 parent 3ad5a6c commit 95545a5

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Dockerfile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,10 @@ ARG TARGET=${target_arch_rust}
141141
ARG PKG_CONFIG_PATH=/usr/lib/${target_arch}/pkgconfig
142142
ARG COPTFLAGS="-O2 ${COPTFLAGS}"
143143

144-
#TODO: find a way to set these in ENV isntead of writing into config.toml
145-
RUN mkdir -p .cargo && tee .cargo/config.toml <<EOF
146-
[target.${target_arch_rust}]
147-
linker = "${target_arch}-gcc"
148-
rustflags = ["-C", "target-cpu=generic"]
149-
EOF
144+
ARG CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=${CC}
145+
ARG CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=${CC}
146+
ARG CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=${CC}
147+
ARG RUSTFLAGS="-C target-cpu=generic"
150148

151149
WORKDIR /opt
152150

0 commit comments

Comments
 (0)