Skip to content

Commit ba8c695

Browse files
committed
Stop passing --check-cfg to rustc
The standard library now has the right configs in it's Cargo.toml
1 parent 8bb463a commit ba8c695

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

build_system/build_sysroot.rs

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,6 @@ fn build_clif_sysroot_for_triple(
267267
prefix.to_str().unwrap()
268268
));
269269
}
270-
rustflags.push("-Zunstable-options".to_owned());
271-
for (name, values) in EXTRA_CHECK_CFGS {
272-
rustflags.push(check_cfg_arg(name, *values));
273-
}
274270
compiler.rustflags.extend(rustflags);
275271
let mut build_cmd = STANDARD_LIBRARY.build(&compiler, dirs);
276272
if channel == "release" {
@@ -330,34 +326,3 @@ fn build_rtstartup(dirs: &Dirs, compiler: &Compiler) -> Option<SysrootTarget> {
330326

331327
Some(target_libs)
332328
}
333-
334-
// Copied from https://github.com/rust-lang/rust/blob/4fd98a4b1b100f5329c6efae18031791f64372d2/src/bootstrap/src/utils/helpers.rs#L569-L585
335-
/// Create a `--check-cfg` argument invocation for a given name
336-
/// and it's values.
337-
fn check_cfg_arg(name: &str, values: Option<&[&str]>) -> String {
338-
// Creating a string of the values by concatenating each value:
339-
// ',values("tvos","watchos")' or '' (nothing) when there are no values.
340-
let next = match values {
341-
Some(values) => {
342-
let mut tmp = values.iter().flat_map(|val| [",", "\"", val, "\""]).collect::<String>();
343-
344-
tmp.insert_str(1, "values(");
345-
tmp.push(')');
346-
tmp
347-
}
348-
None => "".to_string(),
349-
};
350-
format!("--check-cfg=cfg({name}{next})")
351-
}
352-
353-
const EXTRA_CHECK_CFGS: &[(&str, Option<&[&str]>)] = &[
354-
("bootstrap", None),
355-
("stdarch_intel_sde", None),
356-
("no_fp_fmt_parse", None),
357-
("no_global_oom_handling", None),
358-
("no_rc", None),
359-
("no_sync", None),
360-
("netbsd10", None),
361-
("backtrace_in_libstd", None),
362-
("target_arch", Some(&["xtensa"])),
363-
];

0 commit comments

Comments
 (0)