Skip to content

Commit 8168431

Browse files
committed
Add test for unstable values of -Clink-self-contained
1 parent 70690bf commit 8168431

6 files changed

+22
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
error: only `-C link-self-contained` values `y`/`yes`/`on`/`n`/`no`/`off`/`-linker`/`+linker` are stable, the `-Z unstable-options` flag must also be passed to use the unstable values
2+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
error: only `-C link-self-contained` values `y`/`yes`/`on`/`n`/`no`/`off`/`-linker`/`+linker` are stable, the `-Z unstable-options` flag must also be passed to use the unstable values
2+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
error: only `-C link-self-contained` values `y`/`yes`/`on`/`n`/`no`/`off`/`-linker`/`+linker` are stable, the `-Z unstable-options` flag must also be passed to use the unstable values
2+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Checks that values for `-Clink-self-contained` other than the blanket enable/disable and
2+
// `+/-linker` require `-Zunstable-options`.
3+
4+
//@ check-fail
5+
//@ revisions: crto libc unwind sanitizers mingw
6+
//@ [crto] compile-flags: -Clink-self-contained=+crto
7+
//@ [libc] compile-flags: -Clink-self-contained=-libc
8+
//@ [unwind] compile-flags: -Clink-self-contained=+unwind
9+
//@ [sanitizers] compile-flags: -Clink-self-contained=-sanitizers
10+
//@ [mingw] compile-flags: -Clink-self-contained=+mingw
11+
12+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
error: only `-C link-self-contained` values `y`/`yes`/`on`/`n`/`no`/`off`/`-linker`/`+linker` are stable, the `-Z unstable-options` flag must also be passed to use the unstable values
2+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
error: only `-C link-self-contained` values `y`/`yes`/`on`/`n`/`no`/`off`/`-linker`/`+linker` are stable, the `-Z unstable-options` flag must also be passed to use the unstable values
2+

0 commit comments

Comments
 (0)