Skip to content

Commit 0ba6038

Browse files
committed
Auto merge of #39227 - alexcrichton:enable-i686-musl, r=brson
travis: Enable testing i686 musl This fixes the final issues with the target related to unwinding by disabling removal of frame pointers.
2 parents 18b6b8f + d56999a commit 0ba6038

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

src/ci/docker/linux-tested-targets/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ ENV RUST_CONFIGURE_ARGS \
3232
--musl-root-x86_64=/musl-x86_64 \
3333
--musl-root-i686=/musl-i686
3434

35-
# FIXME should also test i686-unknown-linux-musl
3635
ENV SCRIPT \
3736
python2.7 ../x.py test \
3837
--target x86_64-unknown-linux-musl \
38+
--target i686-unknown-linux-musl \
3939
--target i586-unknown-linux-gnu \
4040
&& \
4141
python2.7 ../x.py dist \

src/ci/docker/linux-tested-targets/build-musl.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ cp lib/libunwind.a /musl-x86_64/lib
5757
# for x86_64 again)
5858
rm -rf *
5959
# for i686
60-
CFLAGS="$CFLAGS -m32 -g" CXXFLAGS="$CXXFLAGS -m32 -g" cmake ../libunwind-release_37 \
60+
CFLAGS="$CFLAGS -m32" CXXFLAGS="$CXXFLAGS -m32" cmake ../libunwind-release_37 \
6161
-DLLVM_PATH=/build/llvm-release_37 \
6262
-DLIBUNWIND_ENABLE_SHARED=0
6363
make -j10

src/librustc_back/target/i686_unknown_linux_musl.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,20 @@ pub fn target() -> TargetResult {
1717
base.pre_link_args.push("-m32".to_string());
1818
base.pre_link_args.push("-Wl,-melf_i386".to_string());
1919

20+
// The unwinder used by i686-unknown-linux-musl, the LLVM libunwind
21+
// implementation, apparently relies on frame pointers existing... somehow.
22+
// It's not clear to me why nor where this dependency is introduced, but the
23+
// test suite does not pass with frame pointers eliminated and it passes
24+
// with frame pointers present.
25+
//
26+
// If you think that this is no longer necessary, then please feel free to
27+
// ignore! If it still passes the test suite and the bots then sounds good
28+
// to me.
29+
//
30+
// This may or may not be related to this bug:
31+
// https://llvm.org/bugs/show_bug.cgi?id=30879
32+
base.eliminate_frame_pointer = false;
33+
2034
Ok(Target {
2135
llvm_target: "i686-unknown-linux-musl".to_string(),
2236
target_endian: "little".to_string(),

0 commit comments

Comments
 (0)