File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -191,9 +191,20 @@ impl CodegenBackend for CraneliftCodegenBackend {
191
191
if sess. target . arch == "x86_64" && sess. target . os != "none" {
192
192
// x86_64 mandates SSE2 support
193
193
vec ! [ Symbol :: intern( "fxsr" ) , sym:: sse, Symbol :: intern( "sse2" ) ]
194
- } else if sess. target . arch == "aarch64" && sess. target . os != "none" {
195
- // AArch64 mandates Neon support
196
- vec ! [ sym:: neon]
194
+ } else if sess. target . arch == "aarch64" {
195
+ match & * sess. target . os {
196
+ "none" => vec ! [ ] ,
197
+ // On macOS the aes, sha2 and sha3 features are enabled by default and ring
198
+ // fails to compile on macOS when they are not present.
199
+ "macos" => vec ! [
200
+ sym:: neon,
201
+ Symbol :: intern( "aes" ) ,
202
+ Symbol :: intern( "sha2" ) ,
203
+ Symbol :: intern( "sha3" ) ,
204
+ ] ,
205
+ // AArch64 mandates Neon support
206
+ _ => vec ! [ sym:: neon] ,
207
+ }
197
208
} else {
198
209
vec ! [ ]
199
210
}
You can’t perform that action at this time.
0 commit comments