From 68f297b1c2c6751555322ee0c01499ee115d6a46 Mon Sep 17 00:00:00 2001 From: konstin Date: Sun, 4 Aug 2024 18:00:32 +0200 Subject: [PATCH] Use modern stripping option Use `-C strip=symbols` instead of `-C link-arg=-s`. Still broken due to https://github.com/rust-lang/cargo/issues/14346, but i think it's the right modernization anyway. --- src/compile.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compile.rs b/src/compile.rs index 967156e55..79b2c61e6 100644 --- a/src/compile.rs +++ b/src/compile.rs @@ -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() {