Skip to content

Commit

Permalink
Rollup merge of rust-lang#49849 - alecmocatta:master, r=alexcrichton
Browse files Browse the repository at this point in the history
Add --enable-debug flag to musl CI build script

Building for x86_64-unknown-linux-musl currently results in an executable lacking debug information for musl libc itself. If you request a backtrace in GDB while control flow is within musl – including sycalls made by musl – the result looks like:

```
#0  0x0000000000434b46 in __cp_end ()
#1  0x0000000000432dbd in __syscall_cp_c ()
#2  0x0000000000000000 in ?? ()
```

i.e. not very helpful. Adding --enable-debug resolves this, and --enable-optimize re-enables optimisations which default to off given the previous flag.
  • Loading branch information
kennytm committed Apr 11, 2018
2 parents dfdcf63 + 18e9532 commit 57b15f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ci/docker/scripts/musl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if [ ! -d $MUSL ]; then
fi

cd $MUSL
./configure --disable-shared --prefix=/musl-$TAG $@
./configure --enable-optimize --enable-debug --disable-shared --prefix=/musl-$TAG $@
if [ "$TAG" = "i586" -o "$TAG" = "i686" ]; then
hide_output make -j$(nproc) AR=ar RANLIB=ranlib
else
Expand Down

0 comments on commit 57b15f6

Please sign in to comment.