From 23031e3fa6d95c11ddba5b48eea17cb6531ee089 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Wed, 25 Oct 2023 21:58:14 +0200 Subject: [PATCH] Allow disabling the host-arch feature of cranelift-codegen (#7369) 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. --- Cargo.toml | 2 +- crates/cranelift/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9b612a34f2a0..75a7870ec175 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" } diff --git a/crates/cranelift/Cargo.toml b/crates/cranelift/Cargo.toml index e7318e4abc42..1ef91e7f5e7d 100644 --- a/crates/cranelift/Cargo.toml +++ b/crates/cranelift/Cargo.toml @@ -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 }