forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#127041 - GuillaumeGomez:run-make-override-a…
…liased-flags, r=Kobzol Migrate `run-make/override-aliased-flags` to `rmake.rs` Part of rust-lang#121876. I voluntarily didn't use the helper methods to make it obvious what's tested. r? `@jieyouxu`
- Loading branch information
Showing
3 changed files
with
24 additions
and
24 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
This file was deleted.
Oops, something went wrong.
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,24 @@ | ||
//@ ignore-cross-compile | ||
|
||
use run_make_support::rustc; | ||
|
||
// FIXME: it would be good to check that it's actually the rightmost flags | ||
// that are used when multiple flags are specified, but I can't think of a | ||
// reliable way to check this. | ||
fn main() { | ||
// Test that `-O` and `-C opt-level` can be specified multiple times. | ||
// The rightmost flag will be used over any previous flags. | ||
rustc().arg("-O").arg("-O").input("main.rs").run(); | ||
rustc().arg("-O").arg("-C").arg("opt-level=0").input("main.rs").run(); | ||
rustc().arg("-C").arg("opt-level=0").arg("-O").input("main.rs").run(); | ||
rustc().arg("-C").arg("opt-level=0").arg("-C").arg("opt-level=2").input("main.rs").run(); | ||
rustc().arg("-C").arg("opt-level=2").arg("-C").arg("opt-level=0").input("main.rs").run(); | ||
|
||
// Test that `-g` and `-C debuginfo` can be specified multiple times. | ||
// The rightmost flag will be used over any previous flags. | ||
rustc().arg("-g").arg("-g").input("main.rs").run(); | ||
rustc().arg("-g").arg("-C").arg("debuginfo=0").input("main.rs").run(); | ||
rustc().arg("-C").arg("debuginfo=0").arg("-g").input("main.rs").run(); | ||
rustc().arg("-C").arg("debuginfo=0").arg("-C").arg("debuginfo=2").input("main.rs").run(); | ||
rustc().arg("-C").arg("debuginfo=2").arg("-C").arg("debuginfo=0").input("main.rs").run(); | ||
} |