@@ -75,9 +75,9 @@ unsafe fn configure_llvm(sess: &Session) {
75
75
llvm_args. as_ptr ( ) ) ;
76
76
}
77
77
78
- // WARNING: the features must be known to LLVM or the feature
79
- // detection code will walk past the end of the feature array,
80
- // leading to crashes.
78
+ // WARNING: the features after aplpying `to_llvm_feature` must be known
79
+ // to LLVM or the feature detection code will walk past the end of the feature
80
+ // array, leading to crashes.
81
81
82
82
const ARM_WHITELIST : & ' static [ & ' static str ] = & [ "neon" , "v7" , "vfp2" , "vfp3" , "vfp4" ] ;
83
83
@@ -86,7 +86,7 @@ const AARCH64_WHITELIST: &'static [&'static str] = &["neon", "v7"];
86
86
const X86_WHITELIST : & ' static [ & ' static str ] = & [ "avx" , "avx2" , "bmi" , "bmi2" , "sse" ,
87
87
"sse2" , "sse3" , "sse4.1" , "sse4.2" ,
88
88
"ssse3" , "tbm" , "lzcnt" , "popcnt" ,
89
- "sse4a" , "rdrnd ", "rdseed " , "fma " ,
89
+ "sse4a" , "fma ", "rdrand " , "rdseed " ,
90
90
"xsave" , "xsaveopt" , "xsavec" ,
91
91
"xsaves" , "aes" , "pclmulqdq" ,
92
92
"avx512bw" , "avx512cd" ,
@@ -108,6 +108,7 @@ const MIPS_WHITELIST: &'static [&'static str] = &["msa"];
108
108
pub fn to_llvm_feature ( s : & str ) -> & str {
109
109
match s {
110
110
"pclmulqdq" => "pclmul" ,
111
+ "rdrand" => "rdrnd" ,
111
112
s => s,
112
113
}
113
114
}
0 commit comments