Skip to content

Commit fd96010

Browse files
authored
Rollup merge of #157989 - amy-kwan:amy-kwan/cdylib-test, r=nnethercote
run-make: handle AIX symbol cdylib export test The cdylib export-symbols test was checking for `T my_function` on all non-Darwin targets, but AIX prints the exported symbol as `T .my_function`. This patch updates the test to account for the AIX behavior so the test validates the actual exported symbol correctly.
2 parents c6a23c4 + 89b8090 commit fd96010

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

  • tests/run-make/cdylib-export-c-library-symbols

tests/run-make/cdylib-export-c-library-symbols/rmake.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
//@ ignore-apple
88
// Reason: the compiled binary is executed
99

10-
use run_make_support::{build_native_static_lib, cc, dynamic_lib_name, is_darwin, llvm_nm, rustc};
10+
use run_make_support::{
11+
build_native_static_lib, cc, dynamic_lib_name, is_aix, is_darwin, llvm_nm, rustc,
12+
};
1113

1214
fn main() {
1315
cc().input("foo.c").arg("-c").out_exe("foo.o").run();
@@ -27,6 +29,11 @@ fn main() {
2729
.input(dynamic_lib_name("foo_export"))
2830
.run()
2931
.assert_stdout_contains("T _my_function");
32+
} else if is_aix() {
33+
let out = llvm_nm()
34+
.input(dynamic_lib_name("foo_export"))
35+
.run()
36+
.assert_stdout_contains("T .my_function");
3037
} else {
3138
let out = llvm_nm()
3239
.input(dynamic_lib_name("foo_export"))

0 commit comments

Comments
 (0)