-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't allow both the
+bundle
and +whole-archive
modifiers for rlibs
- Loading branch information
1 parent
fc53fff
commit 2899c45
Showing
5 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/test/ui/native-library-link-flags/mix-bundle-and-whole-archive-link-attr.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// compile-flags: -Zunstable-options --crate-type rlib | ||
// build-fail | ||
// error-pattern: the linking modifiers `+bundle` and `+whole-archive` are not compatible with each other when generating rlibs | ||
|
||
#![feature(native_link_modifiers)] | ||
#![feature(native_link_modifiers_bundle)] | ||
#![feature(native_link_modifiers_whole_archive)] | ||
|
||
#[link(name = "mylib", kind = "static", modifiers = "+bundle,+whole-archive")] | ||
extern "C" { } | ||
|
||
fn main() { } |
6 changes: 6 additions & 0 deletions
6
src/test/ui/native-library-link-flags/mix-bundle-and-whole-archive-link-attr.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
error: the linking modifiers `+bundle` and `+whole-archive` are not compatible with each other when generating rlibs | ||
|
||
error: could not find native static library `mylib`, perhaps an -L flag is missing? | ||
|
||
error: aborting due to 2 previous errors | ||
|
7 changes: 7 additions & 0 deletions
7
src/test/ui/native-library-link-flags/mix-bundle-and-whole-archive.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Mixing +bundle and +whole-archive is not allowed | ||
|
||
// compile-flags: -l static:+bundle,+whole-archive=mylib -Zunstable-options --crate-type rlib | ||
// build-fail | ||
// error-pattern: the linking modifiers `+bundle` and `+whole-archive` are not compatible with each other when generating rlibs | ||
|
||
fn main() { } |
6 changes: 6 additions & 0 deletions
6
src/test/ui/native-library-link-flags/mix-bundle-and-whole-archive.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
error: the linking modifiers `+bundle` and `+whole-archive` are not compatible with each other when generating rlibs | ||
|
||
error: could not find native static library `mylib`, perhaps an -L flag is missing? | ||
|
||
error: aborting due to 2 previous errors | ||
|