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 |
cmichi
left a comment
There was a problem hiding this comment.
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-symbolsflag to thebuildcommand which preventswasm-optfrom 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::optimizewhich unconditionally removes all custom sections. We don't need this anyways becausewasm-optdoes the same optimizations and more. It sufficed to remove all exports from the module (butcallanddeploy) to have the same result withoutpwasm_utils::optimize. I argue that having one less pass involved is a good thing.