From 5cdfe185e69764577888551c552e9f5727ba2cd8 Mon Sep 17 00:00:00 2001 From: Go Murakami Date: Wed, 14 Sep 2022 03:15:56 +0900 Subject: [PATCH] Fix compile command for arm --- lib/cli-compiler/src/commands/compile.rs | 4 +++- lib/cli/src/commands/compile.rs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/cli-compiler/src/commands/compile.rs b/lib/cli-compiler/src/commands/compile.rs index 5f0d4286873..537699e1377 100644 --- a/lib/cli-compiler/src/commands/compile.rs +++ b/lib/cli-compiler/src/commands/compile.rs @@ -50,7 +50,9 @@ impl Compile { .fold(CpuFeature::set(), |a, b| a | b); // Cranelift requires SSE2, so we have this "hack" for now to facilitate // usage - features |= CpuFeature::SSE2; + if target_triple.architecture == Architecture::X86_64 { + features |= CpuFeature::SSE2; + } Target::new(target_triple.clone(), features) }) .unwrap_or_default(); diff --git a/lib/cli/src/commands/compile.rs b/lib/cli/src/commands/compile.rs index bc93aa3e3c7..d6be43411c9 100644 --- a/lib/cli/src/commands/compile.rs +++ b/lib/cli/src/commands/compile.rs @@ -46,7 +46,9 @@ impl Compile { .fold(CpuFeature::set(), |a, b| a | b); // Cranelift requires SSE2, so we have this "hack" for now to facilitate // usage - features |= CpuFeature::SSE2; + if target_triple.architecture == Architecture::X86_64 { + features |= CpuFeature::SSE2; + } Target::new(target_triple.clone(), features) }) .unwrap_or_default();