Some fixes for aarch64

This commit is contained in:
Antoni Boucher 2024-04-24 20:01:57 -04:00
parent 41839175b0
commit 65e8717e45
3 changed files with 23 additions and 9 deletions

View file

@ -128,6 +128,12 @@ pub fn from_fn_attrs<'gcc, 'tcx>(
.join(",");
if !target_features.is_empty() {
#[cfg(feature = "master")]
func.add_attribute(FnAttribute::Target(&target_features));
match cx.sess().target.arch.as_ref() {
"x86" | "x86_64" | "powerpc" => {
func.add_attribute(FnAttribute::Target(&target_features))
}
// The target attribute is not supported on other targets in GCC.
_ => (),
}
}
}