Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug symbols being removed no matter the profile #1448

Open
DexterHill0 opened this issue Nov 8, 2024 · 0 comments
Open

debug symbols being removed no matter the profile #1448

DexterHill0 opened this issue Nov 8, 2024 · 0 comments

Comments

@DexterHill0
Copy link

I cannot seem to get the release/profiling wasm to build with debug symbols. Using the profiling profile does not produe debug symbols in the wasm and this has been previously reported in #797. The solution to that is to add:

[package.metadata.wasm-pack.profile.release]
# previously had just ['-O4']
wasm-opt = ['-O4', '-g']

this to the Cargo.toml, but this does not work in a workspace environment and is ignored if you put it in the Cargo.toml of the crate itself ("package.metadata.wasm-pack.profile.release.?.debug" is an unknown key and will be ignored. Please check your Cargo.toml.).
I've tried installing the master version of wasm-pack to be able to use the new --profile argument, and specify my own profile:

[profile.profiling-test]
inherits = "dev"
lto = true
opt-level = 3
codegen-units = 1
debug = true

but again, this does not produce debug symbols. Adding --no-opt to the arguments does, but that kind of defeats the purpose. Unless I'm missing something obvious, it would be nice to be able to pass -g to wasm-opt some other way, whether it be the command line or in the Cargo.toml.

Is there any way to build in release with debug symbols in a workspace environment?

🌍 Your environment

wasm-pack version: master (32e52ca)
rustc version: rustc 1.81.0 (eeb90cda1 2024-09-04)

@DexterHill0 DexterHill0 changed the title debug symbols being removed no matter the profilke debug symbols being removed no matter the profile Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant