-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
A-configurationArea: cargo config files and env varsArea: cargo config files and env varsE-easyExperience: EasyExperience: Easy
Description
cargo currently passes -g when debugging is on and --cfg ndebug when debugging is off:
if profile.debug() {
cmd.arg("-g");
} else {
cmd.args(&["--cfg", "ndebug"]);
}The rust compiler recently stopped using --cfg ndebug to control debug_assert! and instead uses #[cfg(debug_assertions)], enabled when the optimization-level is 0, and overridable using -C debug-assertions (RFC 563)
We may want to add a debug_assertions profile setting like the existing opt-level and debug settings. Even if we don't, though, we should at least stop passing --cfg ndebug.
Metadata
Metadata
Assignees
Labels
A-configurationArea: cargo config files and env varsArea: cargo config files and env varsE-easyExperience: EasyExperience: Easy