-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #60426 - varkor:fix-duplicate-arg-handling, r=alexcrichton
Stop `-O`/`-C opt-level` and `-g`/`-C debuginfo` conflicting Allow `-O` and `-C opt-level`, and `-g` and `-C debuginfo` to be specified simultaneously without conflict. In such cases, the rightmost provided option is chosen. Fixes #7493. Fixes #32352. ~Blocked on rust-lang/getopts#79 r? @alexcrichton
- Loading branch information
Showing
6 changed files
with
60 additions
and
18 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 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 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 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
22 changes: 22 additions & 0 deletions
22
src/test/run-make-fulldeps/override-aliased-flags/Makefile
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,22 @@ | ||
-include ../tools.mk | ||
|
||
# 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. | ||
|
||
all: | ||
# Test that `-O` and `-C opt-level` can be specified multiple times. | ||
# The rightmost flag will be used over any previous flags. | ||
$(RUSTC) -O -O main.rs | ||
$(RUSTC) -O -C opt-level=0 main.rs | ||
$(RUSTC) -C opt-level=0 -O main.rs | ||
$(RUSTC) -C opt-level=0 -C opt-level=2 main.rs | ||
$(RUSTC) -C opt-level=2 -C opt-level=0 main.rs | ||
|
||
# Test that `-g` and `-C debuginfo` can be specified multiple times. | ||
# The rightmost flag will be used over any previous flags. | ||
$(RUSTC) -g -g main.rs | ||
$(RUSTC) -g -C debuginfo=0 main.rs | ||
$(RUSTC) -C debuginfo=0 -g main.rs | ||
$(RUSTC) -C debuginfo=0 -C debuginfo=2 main.rs | ||
$(RUSTC) -C debuginfo=2 -C debuginfo=0 main.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 @@ | ||
fn main() {} |