Skip to content

Commit ad2b817

Browse files
authored
Do not strip VC redists (#856)
Closes #855 Please see the above issue description for why this addition is proposed
1 parent ddddc08 commit ad2b817

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/release.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,8 +511,12 @@ pub fn convert_to_stripped<W: Write>(
511511
| FileKind::Pe32
512512
| FileKind::Pe64)
513513
) {
514-
data = llvm_strip(&data, llvm_dir)
515-
.with_context(|| format!("failed to strip {}", path.display()))?;
514+
// Skip stripping MSVC runtime DLLs
515+
let filename = path.file_name().and_then(|n| n.to_str());
516+
if !matches!(filename, Some("vcruntime140.dll" | "vcruntime140_1.dll")) {
517+
data = llvm_strip(&data, llvm_dir)
518+
.with_context(|| format!("failed to strip {}", path.display()))?;
519+
}
516520
}
517521

518522
let mut header = entry.header().clone();

0 commit comments

Comments
 (0)