|
2 | 2 | // flag. This is a regression test for https://github.com/rust-lang/compiler-team/issues/656. See |
3 | 3 | // also https://github.com/rust-lang/rust/issues/73295 and |
4 | 4 | // https://github.com/rust-lang/rust/issues/37530. |
| 5 | + |
| 6 | +// We test 3 combinations of command-line flags: |
| 7 | +// * No extra command-line flag: DEFAULT |
| 8 | +// * Overriding to "yes": YES |
| 9 | +// * Overriding to "no": NO |
5 | 10 | // |
6 | | -// revisions:NONE YES NO |
7 | | -//[YES] compile-flags: -Zdefault-hidden-visibility=yes |
8 | | -//[NO] compile-flags: -Zdefault-hidden-visibility=no |
9 | | -// |
| 11 | +// revisions:DEFAULT YES NO |
| 12 | +// [YES] compile-flags: -Zdefault-hidden-visibility=yes |
| 13 | +// [NO] compile-flags: -Zdefault-hidden-visibility=no |
| 14 | + |
10 | 15 | // `compiler/rustc_target/src/spec/base/wasm.rs` has a different default value of |
11 | 16 | // `default_hidden_visibility` - it wouldn't match the test expectations below. |
12 | | -// [NONE] ignore-wasm32 |
| 17 | +// And therefore we skip this test on WASM: |
| 18 | +// |
| 19 | +// ignore-wasm32 |
13 | 20 |
|
14 | 21 | // The test scenario is specifically about visibility of symbols exported out of dynamically linked |
15 | 22 | // libraries. |
|
22 | 29 | // . |
23 | 30 | // We want to verify that the cmdline flag affects the visibility of this symbol: |
24 | 31 | // |
25 | | -// NONE: @{{.*}}default_hidden_visibility{{.*}}exported_symbol{{.*}} = constant |
26 | | -// YES: @{{.*}}default_hidden_visibility{{.*}}exported_symbol{{.*}} = hidden constant |
27 | | -// NO: @{{.*}}default_hidden_visibility{{.*}}exported_symbol{{.*}} = constant |
| 32 | +// DEFAULT: @{{.*}}default_hidden_visibility{{.*}}exported_symbol{{.*}} = constant |
| 33 | +// YES: @{{.*}}default_hidden_visibility{{.*}}exported_symbol{{.*}} = hidden constant |
| 34 | +// NO: @{{.*}}default_hidden_visibility{{.*}}exported_symbol{{.*}} = constant |
28 | 35 | #[used] |
29 | 36 | pub static exported_symbol: [u8; 6] = *b"foobar"; |
0 commit comments