Skip to content

Commit e52ea15

Browse files
committed
Set RUSTFLAGS env to make dylib work
The musl-target doesn't automatically disable static linking of musl when building a dylib, and then complains it can't build a dylib. As a workaround, disable static linking via RUSTFLAGS, to see how far the build gets. The proper fix is to have rustc figure that out automagically.
1 parent cb823df commit e52ea15

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ ENV CFLAGS_x86_64_unknown_linux_musl=-Wa,-mrelax-relocations=no
4343

4444
ENV HOSTS=x86_64-unknown-linux-musl
4545

46+
ENV RUSTFLAGS="-C target-feature=-crt-static"
47+
4648
ENV SCRIPT \
4749
python2.7 ../x.py test --host $HOSTS --target $HOSTS && \
4850
python2.7 ../x.py dist --host $HOSTS --target $HOSTS

0 commit comments

Comments
 (0)