-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Update emscripten version to 1.38.8. #4441
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
Conversation
f7a404a to
e19951e
Compare
|
It also seems possible to use newer versions of emscripten, when restricted to A web assembly build seems possible as well, but so far I did not get the solc-js CLI to work with it (may be worth looking into, though, since it's less than half the size and seems way faster than the asm.js build). |
|
@axic can you tell what the problem was? |
|
It may be that the problem was connected to the gnosis tests that are currently disabled, since they are broken anyways... |
|
#3491 was failing to compile with an updated emscripten version. Perhaps it will compile with the new boost version. Let's push these changes onto that PR and see if it compiles. If at least it is not significantly worse than it is right now, I'd vote to merge this PR. However, does it affect the soljson size? Is it smaller? Bigger? Unfortunately we do not have speed tests (should) to see how that differs between the two boost versions. |
6a942dd to
9c9e55d
Compare
|
@axic Do you think we should fix solc-js to include the hack in the test scripts here? Should be easy to do in a "backwards"-compatible way and might be nice, if people want to build and use |
9c9e55d to
2268a01
Compare
|
The |
2268a01 to
29cb519
Compare
Codecov Report
@@ Coverage Diff @@
## develop #4441 +/- ##
========================================
Coverage 88.25% 88.25%
========================================
Files 347 347
Lines 33153 33153
Branches 3982 3982
========================================
Hits 29260 29260
Misses 2535 2535
Partials 1358 1358
|
3e4c509 to
0ebe738
Compare
|
To me it seems we could also apply this after merging #4486. |
aa6acaf to
2b6113a
Compare
christianparpart
left a comment
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.
apart from my 2 above comments, it's just version number changes, that do LGTM.
13476bf to
08fef06
Compare
|
@axic Regarding the additional compile options: I don't think we need or should unconditionally add |
3225a0d to
715ae47
Compare
|
Rebased and further simplified. |
|
Moving to "Inbox" in 0.5.4 in the hopes that we see some progress on this. The PR is still done and just needs a review. |
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s ERROR_ON_UNDEFINED_SYMBOLS=1") | ||
| add_definitions(-DETH_EMSCRIPTEN=1) | ||
| # Define additional methods to export in soljson.js. Needed by solc-js. | ||
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s EXTRA_EXPORTED_RUNTIME_METHODS=['cwrap','addFunction','removeFunction','Pointer_stringify','lengthBytesUTF8','_malloc','stringToUTF8','setValue']") |
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.
I'm not sure we should have them here or in the libsolc makefile.
The libsolc makefile has the functions exported by libsolc. These are the functions also needed by solc-js.
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.
Actually, I considered moving them, but then kept them here in the end. To me it feels more like a setting for Emscripten to make it export these functions - these are not really defined in libsolc after all... but I'd be fine with moving them over as well, if you prefer that.
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.
I'm not sure which is cleaner:
- having all in libsolc
- having all here
- having them split because they are for different purposes?
- (An additional possibility is to actually use emscripten's annotations in the code to mark exported fnuctions to be kept.)
In any case probably we should keep a note in both places.
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.
I added a notice on both sides. I think it makes sense to split it this way - if e.g. libyul should export some functions, then we should specify it there and not have to duplicate the interface functions exported here.
715ae47 to
4d95f35
Compare
|
Rebased after #5809. |
e11eb0b to
5baac84
Compare
|
@axic I extracted the emscripten changelog between the versions (starting from the latest change, so to be read from bottom to top) and left a short comment on each of them, stating why I think it doesn't affect us or is already addressed, so I think all of this should be fine: Emscripten Changelog between the versions 1.37.21 and 1.38.8:
|
|
The generated size seems to be ~100k smaller (9080k vs 9230k) |
| else | ||
| echo 'NODE_JS=["nodejs", "--stack_size=8192"]' > ~/.emscripten | ||
| mv /emsdk_portable/node/bin/node /emsdk_portable/node/bin/node_orig | ||
| echo -e '#!/bin/sh\nexec /emsdk_portable/node/bin/node_orig --stack-size=8192 $@' > /emsdk_portable/node/bin/node |
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.
Do we really need bash? ;)
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.
As a matter of fact I think we do for having well specified behavior with the arguments here :-).
Depends on argotorg/solc-js#296(merged)This results in: