Skip to content

Commit

Permalink
Allow disabling the host-arch feature of cranelift-codegen (#7369)
Browse files Browse the repository at this point in the history
This is required to compile for a target which doesn't have a cranelift
backend. Before this change using any of the cranelift crates that
depend on cranelift-codegen would forcefully enable all default features
and thus host-arch. With this change only the std and unwind features
are still forcefully enabled as cranelift-codegen doesn't compile with
either disabled.
  • Loading branch information
bjorn3 authored Oct 25, 2023
1 parent d58f526 commit 23031e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ wasmtime-wit-bindgen = { path = "crates/wit-bindgen", version = "=15.0.0" }
test-programs-artifacts = { path = 'crates/test-programs/artifacts' }

cranelift-wasm = { path = "cranelift/wasm", version = "0.102.0" }
cranelift-codegen = { path = "cranelift/codegen", version = "0.102.0" }
cranelift-codegen = { path = "cranelift/codegen", version = "0.102.0", default-features = false, features = ["std", "unwind"] }
cranelift-frontend = { path = "cranelift/frontend", version = "0.102.0" }
cranelift-entity = { path = "cranelift/entity", version = "0.102.0" }
cranelift-native = { path = "cranelift/native", version = "0.102.0" }
Expand Down
2 changes: 1 addition & 1 deletion crates/cranelift/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ anyhow = { workspace = true }
log = { workspace = true }
wasmtime-environ = { workspace = true }
cranelift-wasm = { workspace = true }
cranelift-codegen = { workspace = true }
cranelift-codegen = { workspace = true, features = ["default"] }
cranelift-frontend = { workspace = true }
cranelift-entity = { workspace = true }
cranelift-native = { workspace = true }
Expand Down

0 comments on commit 23031e3

Please sign in to comment.