Skip to content

Commit 16167cb

Browse files
authored
Rollup merge of rust-lang#45310 - gnzlbg:fix_aarch64, r=pnkfelix
aarch64 is not whitelisted for ARM features This prevents the target feature `neon` from being enabled on aarch64.
2 parents 2ff1ad0 + 6020f30 commit 16167cb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/librustc_trans/llvm_util.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ unsafe fn configure_llvm(sess: &Session) {
7373

7474
const ARM_WHITELIST: &'static [&'static str] = &["neon\0", "vfp2\0", "vfp3\0", "vfp4\0"];
7575

76+
const AARCH64_WHITELIST: &'static [&'static str] = &["neon\0"];
77+
7678
const X86_WHITELIST: &'static [&'static str] = &["avx\0", "avx2\0", "bmi\0", "bmi2\0", "sse\0",
7779
"sse2\0", "sse3\0", "sse4.1\0", "sse4.2\0",
7880
"ssse3\0", "tbm\0", "lzcnt\0", "popcnt\0",
@@ -90,6 +92,7 @@ pub fn target_features(sess: &Session) -> Vec<Symbol> {
9092

9193
let whitelist = match &*sess.target.target.arch {
9294
"arm" => ARM_WHITELIST,
95+
"aarch64" => AARCH64_WHITELIST,
9396
"x86" | "x86_64" => X86_WHITELIST,
9497
"hexagon" => HEXAGON_WHITELIST,
9598
"powerpc" | "powerpc64" => POWERPC_WHITELIST,

0 commit comments

Comments
 (0)