Skip to content

Commit

Permalink
wasm-builder: Enable all features when running cargo metadata (pari…
Browse files Browse the repository at this point in the history
…tytech#10716)

This is required for projects like Cumulus that have dependencies on `westend-runtime`, but this
runtime is only added when the `runtime-benchmarks` feature is enabled. By having all features
"enabled" in `cargo metadata` we ensure that all crates can be found.
  • Loading branch information
bkchr authored and Wizdave97 committed Feb 4, 2022
1 parent 15d9b6a commit c467b1a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utils/wasm-builder/src/wasm_project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use toml::value::Table;

use build_helper::rerun_if_changed;

use cargo_metadata::{Metadata, MetadataCommand};
use cargo_metadata::{CargoOpt, Metadata, MetadataCommand};

use walkdir::WalkDir;

Expand Down Expand Up @@ -88,6 +88,7 @@ fn crate_metadata(cargo_manifest: &Path) -> Metadata {

let crate_metadata = MetadataCommand::new()
.manifest_path(cargo_manifest)
.features(CargoOpt::AllFeatures)
.exec()
.expect("`cargo metadata` can not fail on project `Cargo.toml`; qed");

Expand Down

0 comments on commit c467b1a

Please sign in to comment.