Override strip even if you explicitly enable it in the passed profile (#5052)
This commit is contained in:
1 parent
386153672e
commit
5b8bc358db
1 file changed
+8
-11
@@ -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.
|
||||
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 self
|
||||
if !self
|
||||
.workspace
|
||||
.cargo_toml
|
||||
.profile
|
||||
.custom
|
||||
.contains_key(&self.profile)
|
||||
{
|
||||
return vec![];
|
||||
}
|
||||
|
||||
// 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" };
|
||||
|
||||
// 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"#));
|
||||
}
|
||||
}
|
||||
|
||||
// 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
|
||||
args.into_iter()
|
||||
|
||||
Reference in new issue
Block a user