Skip to content

Commit

Permalink
Fix compile command for arm
Browse files Browse the repository at this point in the history
  • Loading branch information
flfymoss committed Sep 15, 2022
1 parent 3225852 commit 26848ef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions lib/cli-compiler/src/commands/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ 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)]
Expand Down Expand Up @@ -50,7 +51,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();
Expand Down
4 changes: 3 additions & 1 deletion lib/cli/src/commands/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 26848ef

Please sign in to comment.