Override strip even if you explicitly enable it in the passed profile (#5052)

This commit is contained in:
Evan Almloff authored and GitHub committed 2025-12-03 12:51:34 -05:00
1 parent 386153672e
commit 5b8bc358db
1 file changed
+8 -11
+8 -11
View File
@@ -5211,21 +5211,21 @@ __wbg_init({{module_or_path: "/{}/{wasm_path}"}}).then((wasm) => {{
/// ///
/// Note how every platform gets its own profile, and each platform has a dev and release profile. /// Note how every platform gets its own profile, and each platform has a dev and release profile.
fn profile_args(&self) -> Vec<String> { fn profile_args(&self) -> Vec<String> {
// Always disable stripping so symbols still exist for the asset system. We will apply strip manually
// after assets are built
let profile = self.profile.as_str();
let mut args = Vec::new();
args.push(format!(r#"profile.{profile}.strip=false"#));
// If the user defined the profile in the Cargo.toml, we don't need to add it to our adhoc list // If the user defined the profile in the Cargo.toml, we don't need to add it to our adhoc list
if self if !self
.workspace .workspace
.cargo_toml .cargo_toml
.profile .profile
.custom .custom
.contains_key(&self.profile) .contains_key(&self.profile)
{ {
return vec![];
}
// Otherwise, we need to add the profile arguments to make it adhoc // Otherwise, we need to add the profile arguments to make it adhoc
let mut args = Vec::new();
let profile = self.profile.as_str();
let inherits = if self.release { "release" } else { "dev" }; let inherits = if self.release { "release" } else { "dev" };
// Add the profile definition first. // Add the profile definition first.
@@ -5244,10 +5244,7 @@ __wbg_init({{module_or_path: "/{}/{wasm_path}"}}).then((wasm) => {{
args.push(format!(r#"profile.{profile}.debug=true"#)); args.push(format!(r#"profile.{profile}.debug=true"#));
} }
} }
}
// Always disable stripping so symbols still exist for the asset system. We will apply strip manually
// after assets are built
args.push(format!(r#"profile.{profile}.strip=false"#));
// Prepend --config to each argument // Prepend --config to each argument
args.into_iter() args.into_iter()