-
Notifications
You must be signed in to change notification settings - Fork 50
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
[WIP] Benchmarking geth+evmc with static libs #511
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
#git clone --single-branch --branch benchmarking-static-lib https://github.com/ewasm/hera | ||
# cd hera | ||
# git submodule update --init | ||
|
||
mkdir -p build | ||
cd build | ||
cmake -DBUILD_SHARED_LIBS=OFF -DHERA_BINARYEN=ON -DHERA_WABT=ON -DHERA_WAVM=ON -DHERA_DEBUGGING=OFF .. | ||
cmake --build . | ||
|
||
cd deps/src/binaryen-build/lib/ | ||
for f in *.a; do ar x $f; done | ||
ar r -s -c libbinaryenfull.a *.o | ||
rm *.o | ||
cd ../../../../ | ||
|
||
|
||
cd deps/src/wavm-build/lib | ||
for f in *.a; do ar x $f; done | ||
ar r -s -c libwavm.a *.o | ||
rm *.o | ||
cd ../../../../ | ||
|
||
# apt-get install llvm-6.0-dev | ||
# llvm .so file is needed for libwavm.a to be usable | ||
|
||
# some flags might be unnecessary | ||
#cgo LDFLAGS: /root/hera/build/src/libhera.a -L/root/hera/build/src/ -lhera -L/root/hera/build/deps/src/wabt-build/ -lwabt /root/hera/build/deps/src/binaryen-build/lib/libbinaryenfull.a /root/hera/build/deps/src/wavm-build/lib/libwavm.a -L/usr/lib/llvm-6.0/build/lib/ -lLLVM -rdynamic -lstdc++ -Wl,-unresolved-symbols=ignore-all | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -572,11 +572,15 @@ void BinaryenEngine::verifyContract(wasm::Module & module) | |
"Contract export (\"memory\") missing." | ||
); | ||
|
||
/* | ||
***** in the metering benchmarks, inline-block and inline-super both export the inline useGas functions | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do they export it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was a workaround to make the wast code use the debug name |
||
// just going to comment this out since here since we need to change Hera for static libs anyway | ||
ensureCondition( | ||
module.exports.size() == 2, | ||
ContractValidationFailure, | ||
"Contract exports more than (\"main\") and (\"memory\")." | ||
); | ||
*/ | ||
|
||
// The existence of this is ensured above. | ||
wasm::Export* main_export = module.getExport(wasm::Name("main")); | ||
|
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.
Why does this needs to be turned off?
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.
It matches wabt default build options.
This breaks some EEI. Long term it would be worth to re-implement EEI without exceptions.