diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-09-03 19:13:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-03 19:13:29 +0200 |
| commit | 442c0779944ac735ac49c0e8bb68b07ea672e952 (patch) | |
| tree | 75fe44e690c137c74decb91740c33173acd60fb2 /compiler/rustc_driver_impl/src | |
| parent | 4ed0f0d384ddcd14ba4e0d21a8d8b81df78318b1 (diff) | |
| parent | aa1f60ecff4060c3c1a76102310af5369460c03d (diff) | |
| download | rust-442c0779944ac735ac49c0e8bb68b07ea672e952.tar.gz rust-442c0779944ac735ac49c0e8bb68b07ea672e952.zip | |
Rollup merge of #129928 - RalfJung:rustc_driver_impl-crt-static, r=compiler-errors
rustc_driver_impl: remove some old dead logic This got added in https://github.com/rust-lang/rust/commit/5013952e4a1b15198c3569fdcb9890af70f06ab9, before `cfg(target_feature)` was stable. It should not be needed any more ever since `cfg(target_feature)` is stable.
Diffstat (limited to 'compiler/rustc_driver_impl/src')
| -rw-r--r-- | compiler/rustc_driver_impl/src/lib.rs | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs index e49ae60e890..cb2fa6e9d74 100644 --- a/compiler/rustc_driver_impl/src/lib.rs +++ b/compiler/rustc_driver_impl/src/lib.rs @@ -61,7 +61,6 @@ use rustc_session::lint::{Lint, LintId}; use rustc_session::output::collect_crate_types; use rustc_session::{config, filesearch, EarlyDiagCtxt, Session}; use rustc_span::source_map::FileLoader; -use rustc_span::symbol::sym; use rustc_span::FileName; use rustc_target::json::ToJson; use rustc_target::spec::{Target, TargetTriple}; @@ -777,16 +776,8 @@ fn print_crate_info( .config .iter() .filter_map(|&(name, value)| { - // Note that crt-static is a specially recognized cfg - // directive that's printed out here as part of - // rust-lang/rust#37406, but in general the - // `target_feature` cfg is gated under - // rust-lang/rust#29717. For now this is just - // specifically allowing the crt-static cfg and that's - // it, this is intended to get into Cargo and then go - // through to build scripts. - if (name != sym::target_feature || value != Some(sym::crt_dash_static)) - && !sess.is_nightly_build() + // On stable, exclude unstable flags. + if !sess.is_nightly_build() && find_gated_cfg(|cfg_sym| cfg_sym == name).is_some() { return None; |
