Skip to content

Commit

Permalink
Allow disabling the host-arch feature of cranelift-codegen (#7371)
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 committed Oct 25, 2023
1 parent ed73433 commit f6f9f36
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 @@ -172,7 +172,7 @@ wasmtime-jit-icache-coherence = { path = "crates/jit-icache-coherence", version
wasmtime-wit-bindgen = { path = "crates/wit-bindgen", version = "=14.0.1" }

cranelift-wasm = { path = "cranelift/wasm", version = "0.101.1" }
cranelift-codegen = { path = "cranelift/codegen", version = "0.101.1" }
cranelift-codegen = { path = "cranelift/codegen", version = "0.101.1", default-features = false, features = ["std", "unwind"] }
cranelift-frontend = { path = "cranelift/frontend", version = "0.101.1" }
cranelift-entity = { path = "cranelift/entity", version = "0.101.1" }
cranelift-native = { path = "cranelift/native", version = "0.101.1" }
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 f6f9f36

Please sign in to comment.