Skip to content

Commit d9bd396

Browse files
committed
Workaround for incorrect target cpu rename in Cranelift
1 parent 0b5b096 commit d9bd396

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,8 @@ fn build_isa(sess: &Session, jit: bool) -> Arc<dyn TargetIsa + 'static> {
345345
if target_triple.architecture == target_lexicon::Architecture::X86_64 {
346346
// Only set the target cpu on x86_64 as Cranelift is missing
347347
// the target cpu list for most other targets.
348-
builder.enable(sess.target.cpu.as_ref()).unwrap();
348+
// FIXME remove the replace once bytecodealliance/wasmtime#12792 lands
349+
builder.enable(&sess.target.cpu.replace("-", "_")).unwrap();
349350
}
350351
builder
351352
}

0 commit comments

Comments
 (0)