Skip to content

Commit 62df656

Browse files
committed
XXX feature permutations fix
1 parent b67db56 commit 62df656

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

xtask/src/main.rs

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,22 @@ use opt::{Action, BuildOpt, ClippyOpt, DocOpt, Opt, QemuOpt, TpmVersion};
2121
use std::process::Command;
2222
use util::run_cmd;
2323

24+
/// Builds various feature permutations that are valid for the `uefi` crate.
2425
fn build_feature_permutations(opt: &BuildOpt) -> Result<()> {
25-
// TODO we should now rethink this
26-
for package in [Package::Uefi] {
27-
let all_package_features = Feature::package_features(package);
28-
for features in all_package_features.iter().powerset() {
29-
let features = features.iter().map(|f| **f).collect();
26+
let all_package_features = Feature::package_features(Package::Uefi);
27+
for features in all_package_features.iter().powerset() {
28+
let features = features.iter().map(|f| **f).collect();
3029

31-
let cargo = Cargo {
32-
action: CargoAction::Build,
33-
features,
34-
packages: vec![package],
35-
release: opt.build_mode.release,
36-
target: Some(*opt.target),
37-
warnings_as_errors: true,
38-
target_types: TargetTypes::BinsExamplesLib,
39-
};
40-
run_cmd(cargo.command()?)?;
41-
}
30+
let cargo = Cargo {
31+
action: CargoAction::Build,
32+
features,
33+
packages: vec![Package::Uefi],
34+
release: opt.build_mode.release,
35+
target: Some(*opt.target),
36+
warnings_as_errors: true,
37+
target_types: TargetTypes::BinsExamplesLib,
38+
};
39+
run_cmd(cargo.command()?)?;
4240
}
4341

4442
Ok(())

0 commit comments

Comments
 (0)