-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Remove ndebug, add config of debug assertions #1444
Conversation
r? @wycats (rust_highfive has picked a reviewer for you, use r? to override) |
@@ -599,8 +599,10 @@ fn build_base_args(cx: &Context, | |||
cmd.arg("-g"); | |||
} | |||
|
|||
if ndebug { | |||
cmd.args(&["--cfg", "ndebug"]); | |||
if debug_assertions && opt_level > 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reasoning for this rather than, say, format!("debug-assertions={}", if debug_assertions { "on" } else { "off" })
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to make the output of -v
at least somewhat prettier, although that may be a bit of a pipe dream at this point!
Should we rename |
That's a very good question! I'm ok leaving it as-is to not break crates. I'm also fine adding levels of precedence such that |
Yeah, we should do the change later (not in this patch) if we decide to; possibly with deprecation messages and/or the precedence you mention. @bors r+ |
📌 Commit 74e2dc7 has been approved by |
This commit removes the ndebug support from Cargo and also adds a new configuration option for profiles, `debug-assertions`, which controls whether debug assertions in the compiler are turned on or not. Closes #1398
💔 Test failed - cargo-win-64 |
@bors: retry On Mon, Mar 23, 2015 at 6:28 PM, bors notifications@github.com wrote:
|
⚡ Previous build results for cargo-linux-32, cargo-linux-64, cargo-mac-32, cargo-mac-64, cargo-win-32 are reusable. Rebuilding only cargo-win-64... |
💔 Test failed - cargo-win-64 |
@bors: retry On Tue, Mar 24, 2015 at 10:32 AM, bors notifications@github.com wrote:
|
⚡ Previous build results for cargo-linux-32, cargo-linux-64, cargo-mac-32, cargo-mac-64, cargo-win-32 are reusable. Rebuilding only cargo-win-64... |
💔 Test failed - cargo-win-64 |
74e2dc7
to
13c07b8
Compare
@bors: r=huonw 13c07b8 |
This commit removes the ndebug support from Cargo and also adds a new configuration option for profiles, `debug-assertions`, which controls whether debug assertions in the compiler are turned on or not. Closes rust-lang#1398
13c07b8
to
c54fc00
Compare
This commit removes the ndebug support from Cargo and also adds a new configuration option for profiles, `debug-assertions`, which controls whether debug assertions in the compiler are turned on or not. Closes #1398
☀️ Test successful - cargo-linux-32, cargo-linux-64, cargo-mac-32, cargo-mac-64, cargo-win-32, cargo-win-64 |
According to #1398 and pull rust-lang/cargo#1444 , fix doc overridable using -C debug-assertions
The "ndebug" cfg directive was removed in rust-lang#1444.
The "ndebug" cfg directive was removed in #1444.
This commit removes the ndebug support from Cargo and also adds a new
configuration option for profiles,
debug-assertions
, which controls whetherdebug assertions in the compiler are turned on or not.
Closes #1398