Skip to main content

Module target_features

Module target_features 

Source

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 Some if a violation is found.
flag_to_backend_features
Translates the -Ctarget-feature flag 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 to target_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 features field 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 features field into a backend target feature list.