Skip to content

Commit

Permalink
comment, and bless, unstable linker flavor test
Browse files Browse the repository at this point in the history
  • Loading branch information
lqd committed Jun 30, 2023
1 parent 6594f36 commit 38f5a99
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/ui/linkage-attr/unstable-flavor.bpf.stderr
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
error: linker flavor `bpf-linker` is unstable, `-Z unstable-options` flag must also be passed to explicitly use it
error: the linker flavor `bpf-linker` is unstable, the `-Z unstable-options` flag must also be passed to use the unstable values

2 changes: 1 addition & 1 deletion tests/ui/linkage-attr/unstable-flavor.ptx.stderr
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
error: linker flavor `ptx-linker` is unstable, `-Z unstable-options` flag must also be passed to explicitly use it
error: the linker flavor `ptx-linker` is unstable, the `-Z unstable-options` flag must also be passed to use the unstable values

8 changes: 6 additions & 2 deletions tests/ui/linkage-attr/unstable-flavor.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
// Even though this test only checks 2 of the 10 or so unstable linker flavors, it exercizes the
// unique codepath checking all unstable options (see `LinkerFlavorCli::is_unstable` and its
// caller). If it passes, all the other unstable options are rejected as well.
//
// revisions: bpf ptx
// [bpf] compile-flags: --target=bpfel-unknown-none -C linker-flavor=bpf-linker --crate-type=rlib
// [bpf] error-pattern: linker flavor `bpf-linker` is unstable, `-Z unstable-options` flag
// [bpf] error-pattern: linker flavor `bpf-linker` is unstable, the `-Z unstable-options` flag
// [bpf] needs-llvm-components:
// [ptx] compile-flags: --target=nvptx64-nvidia-cuda -C linker-flavor=ptx-linker --crate-type=rlib
// [ptx] error-pattern: linker flavor `ptx-linker` is unstable, `-Z unstable-options` flag
// [ptx] error-pattern: linker flavor `ptx-linker` is unstable, the `-Z unstable-options` flag
// [ptx] needs-llvm-components:

#![feature(no_core)]
Expand Down

0 comments on commit 38f5a99

Please sign in to comment.