-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Stop -O
/-C opt-level
and -g
/-C debuginfo
conflicting
#60426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e6da57f
e8e43c9
11b1d48
d54cf00
ecd0468
12f63ec
80f54ba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can't we make There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (cc @varkor for his comment on #60426 (comment) which I read just now) |
||
|
||
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
fn main() {} |
Uh oh!
There was an error while loading. Please reload this page.