diff --git a/lib/cli-compiler/src/commands/compile.rs b/lib/cli-compiler/src/commands/compile.rs index 5f0d4286873..a5af2443c65 100644 --- a/lib/cli-compiler/src/commands/compile.rs +++ b/lib/cli-compiler/src/commands/compile.rs @@ -6,7 +6,7 @@ use std::path::{Path, PathBuf}; use wasmer_compiler::{ArtifactBuild, ArtifactCreate, ModuleEnvironment}; use wasmer_types::entity::PrimaryMap; use wasmer_types::{ - CompileError, CpuFeature, MemoryIndex, MemoryStyle, TableIndex, TableStyle, Target, Triple, + Architecture, CompileError, CpuFeature, MemoryIndex, MemoryStyle, TableIndex, TableStyle, Target, Triple, }; #[derive(Debug, Parser)] @@ -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();