|
2 | 2 | use gccjit::Context; |
3 | 3 | use smallvec::{smallvec, SmallVec}; |
4 | 4 |
|
5 | | -use rustc_codegen_ssa::target_features::{ |
6 | | - supported_target_features, tied_target_features, RUSTC_SPECIFIC_FEATURES, |
7 | | -}; |
8 | 5 | use rustc_data_structures::fx::FxHashMap; |
9 | 6 | use rustc_middle::bug; |
10 | 7 | use rustc_session::Session; |
| 8 | +use rustc_target::target_features::RUSTC_SPECIFIC_FEATURES; |
11 | 9 |
|
12 | 10 | use crate::errors::{PossibleFeature, TargetFeatureDisableOrEnable, UnknownCTargetFeature, UnknownCTargetFeaturePrefix}; |
13 | 11 |
|
@@ -44,7 +42,7 @@ pub(crate) fn global_gcc_features(sess: &Session, diagnostics: bool) -> Vec<Stri |
44 | 42 | ); |
45 | 43 |
|
46 | 44 | // -Ctarget-features |
47 | | - let supported_features = supported_target_features(sess); |
| 45 | + let supported_features = sess.target.supported_target_features(); |
48 | 46 | let mut featsmap = FxHashMap::default(); |
49 | 47 | let feats = sess.opts.cg.target_feature |
50 | 48 | .split(',') |
@@ -187,7 +185,7 @@ pub fn to_gcc_features<'a>(sess: &Session, s: &'a str) -> SmallVec<[&'a str; 2]> |
187 | 185 | // Given a map from target_features to whether they are enabled or disabled, |
188 | 186 | // ensure only valid combinations are allowed. |
189 | 187 | pub fn check_tied_features(sess: &Session, features: &FxHashMap<&str, bool>) -> Option<&'static [&'static str]> { |
190 | | - for tied in tied_target_features(sess) { |
| 188 | + for tied in sess.target.tied_target_features() { |
191 | 189 | // Tied features must be set to the same value, or not set at all |
192 | 190 | let mut tied_iter = tied.iter(); |
193 | 191 | let enabled = features.get(tied_iter.next().unwrap()); |
|
0 commit comments