Skip to content

Commit 731c2dc

Browse files
committed
Skipping the new default-hidden-visibility.rs test for WASM targets.
The test expectations don't apply to WASM, where the target spec has a different default value of `default_hidden_visibility`. See the test comments for more details.
1 parent 64c3b98 commit 731c2dc

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

tests/codegen/default-hidden-visibility.rs

+15-8
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,21 @@
22
// flag. This is a regression test for https://github.com/rust-lang/compiler-team/issues/656. See
33
// also https://github.com/rust-lang/rust/issues/73295 and
44
// 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
510
//
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+
1015
// `compiler/rustc_target/src/spec/base/wasm.rs` has a different default value of
1116
// `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
1320

1421
// The test scenario is specifically about visibility of symbols exported out of dynamically linked
1522
// libraries.
@@ -22,8 +29,8 @@
2229
// .
2330
// We want to verify that the cmdline flag affects the visibility of this symbol:
2431
//
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
2835
#[used]
2936
pub static exported_symbol: [u8; 6] = *b"foobar";

0 commit comments

Comments
 (0)