aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrik Tjäder <henrik@tjaders.com>2025-06-08 13:46:46 +0200
committerEmil Fresk <emil.fresk@gmail.com>2025-06-15 08:11:11 +0000
commit9bc60cc5ed4c66fa24fa1a9c24e7e4c27b94d546 (patch)
tree111d56be64cca6bbb341a5d62a5b9e421b18e3f8
parentc27c25154285401cc0d2af6182dae830db6e57d4 (diff)
xtask: run: Use common BuildMode
-rw-r--r--xtask/src/run.rs20
1 files changed, 12 insertions, 8 deletions
diff --git a/xtask/src/run.rs b/xtask/src/run.rs
index a7e3c14..55ad44c 100644
--- a/xtask/src/run.rs
+++ b/xtask/src/run.rs
@@ -174,13 +174,14 @@ pub fn cargo<'c>(
})
.map(move |(package, target, features)| {
let target = target.into();
+ let mode = BuildMode::Release;
let command = match operation {
BuildOrCheck::Check => CargoCommand::Check {
cargoarg,
package: Some(package.name()),
target,
features,
- mode: BuildMode::Release,
+ mode,
dir: None,
deny_warnings: globals.deny_warnings,
},
@@ -189,7 +190,7 @@ pub fn cargo<'c>(
package: Some(package.name()),
target,
features,
- mode: BuildMode::Release,
+ mode,
dir: None,
deny_warnings: globals.deny_warnings,
},
@@ -217,6 +218,7 @@ pub fn cargo_example<'c>(
let path = format!("examples/{}", platform.name());
let dir = Some(PathBuf::from(path));
let features = Some(backend.to_target().and_features(backend.to_rtic_feature()));
+ let mode = BuildMode::Release;
let command = match operation {
BuildOrCheck::Check => CargoCommand::ExampleCheck {
@@ -225,7 +227,7 @@ pub fn cargo_example<'c>(
example,
target: Some(backend.to_target()),
features,
- mode: BuildMode::Release,
+ mode,
dir,
deny_warnings: globals.deny_warnings,
},
@@ -235,7 +237,7 @@ pub fn cargo_example<'c>(
example,
target: Some(backend.to_target()),
features,
- mode: BuildMode::Release,
+ mode,
dir,
deny_warnings: globals.deny_warnings,
},
@@ -389,6 +391,7 @@ pub fn qemu_run_examples<'c>(
let path = format!("examples/{}", platform.name());
let dir = Some(PathBuf::from(path));
let target = target.into();
+ let mode = BuildMode::Release;
let cmd_build = CargoCommand::ExampleBuild {
cargoarg: &None,
@@ -396,7 +399,7 @@ pub fn qemu_run_examples<'c>(
example,
target,
features: features.clone(),
- mode: BuildMode::Release,
+ mode,
dir: dir.clone(),
deny_warnings: globals.deny_warnings,
};
@@ -407,7 +410,7 @@ pub fn qemu_run_examples<'c>(
example,
target,
features: features.clone(),
- mode: BuildMode::Release,
+ mode,
dir,
deny_warnings: globals.deny_warnings,
};
@@ -436,6 +439,7 @@ pub fn build_and_check_size<'c>(
let path = format!("examples/{}", platform.name());
let dir = Some(PathBuf::from(path));
let target = target.into();
+ let mode = BuildMode::Release;
// Make sure the requested example(s) are built
let cmd_build = CargoCommand::ExampleBuild {
@@ -444,7 +448,7 @@ pub fn build_and_check_size<'c>(
example,
target,
features: features.clone(),
- mode: BuildMode::Release,
+ mode,
dir: dir.clone(),
deny_warnings: globals.deny_warnings,
};
@@ -455,7 +459,7 @@ pub fn build_and_check_size<'c>(
example,
target,
features: features.clone(),
- mode: BuildMode::Release,
+ mode,
arguments: arguments.clone(),
dir,
deny_warnings: globals.deny_warnings,