Skip to content

Commit ed8ba1e

Browse files
authored
Use modern stripping option (#2173)
Use `-C strip=symbols` instead of `-C link-arg=-s`. Still broken due to rust-lang/cargo#14346, but i think it's the right modernization anyway.
1 parent a283df0 commit ed8ba1e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/compile.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,10 @@ fn cargo_build_command(
275275
}
276276

277277
if context.strip {
278+
// https://doc.rust-lang.org/rustc/codegen-options/index.html#strip
278279
cargo_rustc
279280
.args
280-
.extend(["-C".to_string(), "link-arg=-s".to_string()]);
281+
.extend(["-C".to_string(), "strip=symbols".to_string()]);
281282
}
282283

283284
let mut build_command = if target.is_msvc() && target.cross_compiling() {

0 commit comments

Comments
 (0)