Skip to content

Commit

Permalink
Rollup merge of rust-lang#55564 - smaeul:test-fixes-2, r=alexcrichton
Browse files Browse the repository at this point in the history
test/linkage-visibility: Ignore on musl targets

DynamicLibrary uses libc's dlsym() function internally to find symbols.
Some implementations of dlsym(), like musl's, only look at dynamically-
exported symbols, as found in shared libraries. To also export symbols
from the main executable, pass --export-dynamic to the linker.

(Plus see [here](https://stackoverflow.com/questions/4184017) and [here](https://stackoverflow.com/questions/6121838) for examples of where this is necessary on glibc as well.)
  • Loading branch information
pietroalbini authored Nov 18, 2018
2 parents 36e1d9f + 8c8ff6a commit 21ff709
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/test/run-pass-fulldeps/auxiliary/linkage-visibility.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-musl - dlsym doesn't see symbols without "-C link-arg=-Wl,--export-dynamic"

#![feature(rustc_private)]

// We're testing linkage visibility; the compiler warns us, but we want to
Expand Down

0 comments on commit 21ff709

Please sign in to comment.