fix(trim-paths): merge trim-paths from different profiles

In 4d29af1 we forgot to add trim-paths to `fn merge()`.
This commit follows how `-Zprofile-rustflags` works ---
overriding instead of merging array.
This commit is contained in:
Weihang Lo 2023-11-01 22:53:27 -04:00
parent 618701921d
commit 7535971d8b
No known key found for this signature in database
GPG Key ID: D7DBF189825E82E7
2 changed files with 5 additions and 1 deletions

View File

@ -3007,6 +3007,10 @@ impl TomlProfile {
if let Some(v) = &profile.strip {
self.strip = Some(v.clone());
}
if let Some(v) = &profile.trim_paths {
self.trim_paths = Some(v.clone())
}
}
}

View File

@ -192,7 +192,7 @@ fn profile_merge_works() {
"\
[COMPILING] foo v0.0.1 ([CWD])
[RUNNING] `rustc [..]\
-Zremap-path-scope=macro \
-Zremap-path-scope=diagnostics \
--remap-path-prefix=[..]/lib/rustlib/src/rust=/rustc/[..] \
--remap-path-prefix=[CWD]= [..]
[FINISHED] custom [..]",