From f88d302d85a35a9838f3f4b764ad37935ebd1b47 Mon Sep 17 00:00:00 2001 From: Ivan Shapovalov Date: Wed, 8 May 2024 01:23:25 +0200 Subject: [PATCH] Force `strip = false` for the current profile --- src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.rs b/src/main.rs index 9e016c9..d124a40 100644 --- a/src/main.rs +++ b/src/main.rs @@ -689,6 +689,10 @@ fn get_cargo_envs(args: &Args, target_triple: &str) .to_ascii_uppercase() .replace('-', "_"); + // No matter which profile we are building for, never strip the binary + // because we need the symbols + list.push((format!("CARGO_PROFILE_{}_STRIP", profile), "false")); + // When targeting MSVC, symbols data will be stored in PDB files, // so always generate debug info if target_triple.contains("msvc") {