-
Notifications
You must be signed in to change notification settings - Fork 119
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
Add --keep-symbols
flag
#302
Conversation
How about not adding a new flag (that users have to know) but instead do all this whenever we do a normal |
There is no |
I think what Robin means that in a recent PR we decided against a By debug info we currently only have the I think the misunderstanding here is that you are probably referring to the fact that we always build contracts as So the distinction I think Robin wants to make is that we have a debug and a release mode for |
But nothing of those things is a reality on |
It's approved, but not yet merged because we need rc4 to be released first. |
Thanks. I checked the PR. I disagree. |
If this is the case then please rename the flag to |
we have create a pr in post #131 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! cargo fmt
fails right now, but besides that it LGTM.
Yeah but not because of the code. Just some intermittent CI failures. Saw this multiple times here:
|
Merging this. The CI is broken (some caching issue, again). I ran |
In order to properly analyze a contract binary we need to keep the wasm name section alive so that we can see what is going on. Using the non post processed wasm file is of no use because we are interested in the fully optimized binary when doing an analysis. To that end I added a new
--keep-symbols
flag to thebuild
command which preventswasm-opt
from removing the debug section.I needed to make some other changes to make this work, too. Most notable I removed the call to
pwasm_utils::optimize
which unconditionally removes all custom sections. We don't need this anyways becausewasm-opt
does the same optimizations and more. It sufficed to remove all exports from the module (butcall
anddeploy
) to have the same result withoutpwasm_utils::optimize
. I argue that having one less pass involved is a good thing.