Prevent stable libtest from supporting -Zunstable-options

This commit is contained in:
Thom Chiovoloni 2023-03-12 00:23:28 -08:00
parent 8a73f50d87
commit ce6adccdad
No known key found for this signature in database

View file

@ -339,6 +339,12 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
""
};
// `libtest` uses this to know whether or not to support
// `-Zunstable-options`.
if !builder.unstable_features() {
cargo.env("CFG_DISABLE_UNSTABLE_FEATURES", "1");
}
let mut features = String::new();
// Cranelift doesn't support `asm`.