Skip to content

Commit

Permalink
add test for -Clink-self-contained consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
lqd committed Oct 8, 2023
1 parent 73bc86c commit 7de4f26
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
error: some `-C link-self-contained` components were both enabled and disabled: crto, linker

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
error: some `-C link-self-contained` components were both enabled and disabled: linker

10 changes: 10 additions & 0 deletions tests/ui/linkage-attr/link-self-contained-consistency.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Checks that self-contained linking components cannot be both enabled and disabled at the same
// time on the CLI.

// check-fail
// revisions: one many
// [one] compile-flags: -Clink-self-contained=-linker -Clink-self-contained=+linker -Zunstable-options
// [many] compile-flags: -Clink-self-contained=+linker,+crto -Clink-self-contained=-linker,-crto -Zunstable-options
// ignore-tidy-linelength

fn main() {}

0 comments on commit 7de4f26

Please sign in to comment.