mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-07 21:28:21 +00:00
Fix compile command for arm
This commit is contained in:
@@ -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)]
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user