@@ -28,10 +28,17 @@ RUN CFLAGS="-Wa,-mrelax-relocations=no -Wa,--compress-debug-sections=none -Wl,--
2828COPY scripts/sccache.sh /scripts/
2929RUN sh /scripts/sccache.sh
3030
31+ ENV HOSTS=x86_64-unknown-linux-musl
32+
3133ENV RUST_CONFIGURE_ARGS \
3234 --musl-root-x86_64=/usr/local/x86_64-linux-musl \
3335 --enable-extended \
34- --disable-docs
36+ --disable-docs \
37+ --set target.x86_64-unknown-linux-musl.crt-static=false \
38+ --build $HOSTS \
39+ --set target.x86_64-unknown-linux-musl.cc=x86_64-linux-musl-gcc \
40+ --set target.x86_64-unknown-linux-musl.cxx=x86_64-linux-musl-g++ \
41+ --set target.x86_64-unknown-linux-musl.linker=x86_64-linux-musl-gcc
3542
3643# Newer binutils broke things on some vms/distros (i.e., linking against
3744# unknown relocs disabled by the following flag), so we need to go out of our
@@ -42,12 +49,4 @@ ENV RUST_CONFIGURE_ARGS \
4249ENV CFLAGS_x86_64_unknown_linux_musl="-Wa,-mrelax-relocations=no -Wa,--compress-debug-sections=none \
4350 -Wl,--compress-debug-sections=none"
4451
45- ENV HOSTS=x86_64-unknown-linux-musl \
46- CC_x86_64_unknown_linux_musl=x86_64-linux-musl-gcc \
47- CXX_x86_64_unknown_linux_musl=x86_64-linux-musl-g++
48-
49- # Musl defaults to static libs but we need them to be dynamic for host toolchain.
50- # The toolchain will produce static libs by default.
51- ENV RUSTFLAGS="-C target-feature=-crt-static"
52-
53- ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
52+ ENV SCRIPT python2.7 ../x.py dist --build $HOSTS
0 commit comments