Re-exportsยง
use rustc_attr_ir::InstructionSetAttr;๐use rustc_data_structures::fx::FxHashMap;๐use rustc_data_structures::fx::FxHashSet;๐use rustc_data_structures::fx::FxIndexSet;๐use rustc_data_structures::unord::UnordMap;๐use rustc_data_structures::unord::UnordSet;๐use rustc_hir::def::DefKind;๐use rustc_hir::def_id::DefId;๐use rustc_hir::def_id::LOCAL_CRATE;๐use rustc_hir::def_id::LocalDefId;๐use rustc_lint_defs::builtin::AARCH64_SOFTFLOAT_NEON;๐use rustc_lint_defs::builtin::X86_SOFTFLOAT_SSE;๐use rustc_middle::middle::codegen_fn_attrs::TargetFeature;๐use rustc_middle::middle::codegen_fn_attrs::TargetFeatureKind;๐use rustc_middle::query::Providers;๐use rustc_middle::ty::TyCtxt;๐use rustc_session::EarlySession;๐use rustc_session::diagnostics::feature_err;๐use rustc_span::Span;๐use rustc_span::Symbol;๐use rustc_span::edit_distance;๐use rustc_span::sym;๐use rustc_target::spec::Arch;๐use rustc_target::spec::SanitizerSet;๐use rustc_target::spec::Target;๐use rustc_target::target_features::RUSTC_SPECIFIC_FEATURES;๐use rustc_target::target_features::Stability;๐use smallvec::SmallVec;๐use crate::diagnostics::CrossArchFeatureNote;๐use crate::diagnostics::FeatureNotValid;๐use crate::diagnostics::FeatureNotValidHint;๐use crate::diagnostics;๐use crate::target_features;๐
Functionsยง
- asm_
target_ ๐features - Computes the set of target features used in a function for the purposes of inline assembly.
- check_
target_ ๐feature_ trait_ unsafe - Checks the function annotated with
#[target_feature]is not a safe trait method implementation, reporting an error if it is. - check_
tied_ features - Given a map from target_features to whether they are enabled or disabled, ensure only valid
combinations are allowed. Returns
Someif a violation is found. - flag_
to_ backend_ features - Translates the
-Ctarget-featureflag into a backend target feature list. - from_
target_ ๐feature_ attr - Compute the enabled target features from the
#[target_feature]function attribute. Enabled target features are added totarget_features. - internal_
target_ features - Utility function for a codegen backend to compute the set of all actually enabled Rust target
features (which will be stored in
sess.internal_target_features). - parse_
rust_ ๐feature_ list - Parse the value of the target spec
featuresfield or-Ctarget-feature, calling the closure for each entry in the list, also expanding implied features (but only for actual Rust target features). If the list contains a syntactically invalid item (not starting with+/-) , the error callback is invoked. - provide ๐
- retpoline_
features_ by_ flags - Computes the backend target features to be added to account for retpoline flags. Used by both LLVM and GCC since their target features are, conveniently, the same.
- sanitizer_
features_ by_ flags - Computes the backend target features to be added to account for sanitizer flags.
- target_
spec_ to_ backend_ features - Translates the target spec
featuresfield into a backend target feature list.