feat: add support for replacement flags in build specifications and enhance flag processing

This commit is contained in:
2026-03-12 02:18:47 -05:00
parent fed3285db3
commit 94d0ded6b7
4 changed files with 504 additions and 6 deletions
+3 -2
View File
@@ -50,8 +50,9 @@ pub fn build(
crate::builder::standard_build_env(spec, cross, false, export_compiler_flags);
// RUSTFLAGS
if !flags.rustflags.is_empty() {
crate::builder::set_env_var(&mut env_vars, "RUSTFLAGS", flags.rustflags.join(" "));
let rustflags = crate::builder::effective_rustflags(flags);
if !rustflags.is_empty() {
crate::builder::set_env_var(&mut env_vars, "RUSTFLAGS", rustflags.join(" "));
}
// If cross-compiling, set linker via CARGO_TARGET_*_LINKER