Only add rustc_randomized_layouts if the crate has it

This commit is contained in:
Guillaume Gomez 2025-03-17 10:43:28 +01:00
parent 417bfe2125
commit 4394f94023

View file

@ -683,7 +683,7 @@ impl Build {
features.push("llvm");
}
// keep in sync with `bootstrap/compile.rs:rustc_cargo_env`
if self.config.rust_randomize_layout {
if self.config.rust_randomize_layout && check("rustc_randomized_layouts") {
features.push("rustc_randomized_layouts");
}