Skip to content

Commit

Permalink
Use modern stripping option (#2173)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
konstin authored Aug 5, 2024
1 parent a283df0 commit ed8ba1e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,10 @@ fn cargo_build_command(
}

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

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

0 comments on commit ed8ba1e

Please sign in to comment.