Skip to content

Commit be2305d

Browse files
authored
Rollup merge of rust-lang#55564 - smaeul:test-fixes-2, r=alexcrichton
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.)
2 parents f6e9485 + 8c8ff6a commit be2305d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/test/run-pass-fulldeps/auxiliary/linkage-visibility.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-musl - dlsym doesn't see symbols without "-C link-arg=-Wl,--export-dynamic"
12+
1113
#![feature(rustc_private)]
1214

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

0 commit comments

Comments
 (0)