Skip to content

Commit 9c10e7a

Browse files
committed
Auto merge of #60240 - mati865:musl_toolchain, r=<try>
Bootstrap x86_64 musl by itself It should slightly reduce build time and prepares ground for musl native tests. NOTE: I haven't tested artifacts yet (only the build). Can I have double try? r? @alexcrichton
2 parents e305df1 + edb396d commit 9c10e7a

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

.travis.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ matrix:
2222
# Images used in testing PR and try-build should be run first.
2323
- env: IMAGE=x86_64-gnu-llvm-6.0 RUST_BACKTRACE=1
2424
name: x86_64-gnu-llvm-6.0
25-
if: type = pull_request OR branch = auto
25+
if: branch = auto
2626

2727
- env: IMAGE=dist-x86_64-linux DEPLOY=1
2828
name: dist-x86_64-linux
@@ -33,7 +33,7 @@ matrix:
3333
# additional testing.
3434
- env: IMAGE=dist-x86_64-linux DEPLOY_ALT=1
3535
name: dist-x86_64-linux-alt
36-
if: branch = try OR branch = auto
36+
if: branch = auto
3737

3838
- env: >
3939
RUST_CHECK_TARGET=dist
@@ -188,7 +188,7 @@ matrix:
188188
if: branch = auto
189189
- env: IMAGE=dist-x86_64-musl DEPLOY=1
190190
name: dist-x86_64-musl
191-
if: branch = auto
191+
if: branch = try OR branch = auto
192192
- env: IMAGE=dist-x86_64-netbsd DEPLOY=1
193193
name: dist-x86_64-netbsd
194194
if: branch = auto
@@ -227,7 +227,7 @@ matrix:
227227
if: branch = auto
228228
- env: IMAGE=mingw-check
229229
name: mingw-check
230-
if: type = pull_request OR branch = auto
230+
if: branch = auto
231231

232232
- stage: publish toolstate
233233
if: branch = master AND type = push

src/ci/docker/dist-x86_64-musl/Dockerfile

+9-10
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,17 @@ RUN CFLAGS="-Wa,-mrelax-relocations=no -Wa,--compress-debug-sections=none -Wl,--
2828
COPY scripts/sccache.sh /scripts/
2929
RUN sh /scripts/sccache.sh
3030

31+
ENV HOSTS=x86_64-unknown-linux-musl
32+
3133
ENV 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 \
4249
ENV 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

Comments
 (0)