Skip to content

Commit 81d17e6

Browse files
authored
Rollup merge of rust-lang#140187 - amy-kwan:amy-kwan/update_runmake_tests_AIX, r=jieyouxu
[AIX] Handle AIX dynamic library extensions within c-link-to-rust-dylib run-make test Dynamic libraries on AIX have the ".a" extension. The c-link-to-rust-dylib run-make test checks for the extension explicitly, so the extension for AIX is also added to accommodate the test case on AIX.
2 parents ca9a2d1 + fdf2c47 commit 81d17e6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/run-make/c-link-to-rust-dylib/rmake.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ fn main() {
2323
if path.is_file()
2424
&& path.extension().is_some_and(|ext| ext == expected_extension)
2525
&& path.file_name().and_then(|name| name.to_str()).is_some_and(|name| {
26-
name.ends_with(".so") || name.ends_with(".dll") || name.ends_with(".dylib")
26+
if cfg!(target_os = "aix") {
27+
name.ends_with(".a")
28+
} else {
29+
name.ends_with(".so") || name.ends_with(".dll") || name.ends_with(".dylib")
30+
}
2731
})
2832
{
2933
rfs::remove_file(path);

0 commit comments

Comments
 (0)