Closed
Description
The DEBUG
environment variable set for a build script currently gets set to true
if you have a profile with debug=0
. AFAIK, rustc treats debug=0 the same as no debug, so I think it should be false.
Repro:
cargo new --lib a
cd a
cat >> Cargo.toml <<EOL
[profile.dev]
debug = 0
EOL
cat > build.rs <<EOL
fn main() { println!("DEBUG={}", std::env::var("DEBUG").unwrap()); }
EOL
cargo build -vv
I can fix this if you'd like.
Metadata
Metadata
Assignees
Labels
No labels