Skip to content

Commit 6e562ec

Browse files
committed
Use revisions
1 parent 8ff5758 commit 6e562ec

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

tests/ui/link-native-libs/issue-70093/link-native-libraries-unixy.rs

-10
This file was deleted.

tests/ui/link-native-libs/issue-70093/link-native-libraries-msvc.rs renamed to tests/ui/link-native-libs/issue-70093/link-native-libraries.rs

+11-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1+
//@ run-pass
2+
//@ compile-flags: -Zlink-native-libraries=no -Cdefault-linker-libraries=yes
3+
//@ ignore-fuchsia - missing __libc_start_main for some reason (#84733)
4+
//@ ignore-cross-compile - default-linker-libraries=yes doesn't play well with cross compiling
5+
6+
//@ revisions: other
7+
//@[other] ignore-msvc
8+
9+
//@ revisions: msvc
110
// On Windows MSVC, default-linker-libraries=yes doesn't work because
211
// rustc drives the linker directly instead of going through another compiler.
312
// Therefore rustc would need to implement default-linker-libraries itself but doesn't.
413
// So instead we use -Clink-arg to directly set the required msvcrt.lib as a link arg.
5-
6-
//@ run-pass
7-
//@ compile-flags: -Zlink-native-libraries=no -Clink-arg=msvcrt.lib
8-
//@ only-msvc
9-
//@ ignore-cross-compile
14+
//@[msvc] compile-flags: -Clink-arg=msvcrt.lib
15+
//@[msvc] only-msvc
1016

1117
#[link(name = "some-random-non-existent-library", kind = "static")]
1218
extern "C" {}

0 commit comments

Comments
 (0)