Skip to content

Commit

Permalink
Add split-debuginfo to cargo profiles (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
mladedav authored Sep 11, 2023
1 parent 09f8c3b commit 5dbdec7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ pub struct Profile {
pub strip: Option<StripSetting>,
#[serde(default)]
pub package: BTreeMap<String, Value>,
pub split_debuginfo: Option<String>,
/// profile overrides
pub build_override: Option<Value>,
}
Expand Down
1 change: 1 addition & 0 deletions tests/opt_level.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ publish = false

[profile.bench]
opt-level = 3
split-debuginfo = "unpacked"

[profile.my-custom]
opt-level = 2
Expand Down
10 changes: 10 additions & 0 deletions tests/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ fn opt_level() {
3,
profiles
.bench
.clone()
.unwrap()
.opt_level
.unwrap()
Expand All @@ -49,6 +50,15 @@ fn opt_level() {
assert!(!m.lib.unwrap().bench);
assert_eq!(None, package.edition);
assert_eq!(1, m.patch.unwrap().len());
assert_eq!(
"unpacked",
profiles
.bench
.unwrap()
.split_debuginfo
.unwrap()
.as_str()
);
}

#[test]
Expand Down

0 comments on commit 5dbdec7

Please sign in to comment.