Skip to content

Commit 9551ed3

Browse files
committed
Add nightly feature
1 parent 348043a commit 9551ed3

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/cargo/core/features.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,9 @@ features! {
214214

215215
// Opt-in new-resolver behavior.
216216
[unstable] resolver: bool,
217+
218+
// Allow to specify whether binaries should be stripped.
219+
[unstable] strip: bool,
217220
}
218221
}
219222

@@ -353,6 +356,7 @@ pub struct CliUnstable {
353356
pub crate_versions: bool,
354357
pub separate_nightlies: bool,
355358
pub multitarget: bool,
359+
pub strip: bool,
356360
}
357361

358362
impl CliUnstable {
@@ -432,6 +436,7 @@ impl CliUnstable {
432436
"crate-versions" => self.crate_versions = parse_empty(k, v)?,
433437
"separate-nightlies" => self.separate_nightlies = parse_empty(k, v)?,
434438
"multitarget" => self.multitarget = parse_empty(k, v)?,
439+
"strip" => self.strip = parse_empty(k, v)?,
435440
_ => bail!("unknown `-Z` flag specified: {}", k),
436441
}
437442

src/cargo/util/toml/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ impl TomlProfile {
525525
}
526526

527527
if let Some(strip) = &self.strip {
528+
features.require(Feature::strip())?;
528529
if strip != "debuginfo" && strip != "none" && strip != "symbols" {
529530
bail!(
530531
"`strip` setting of `{}` is not a valid setting,\

0 commit comments

Comments
 (0)