This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
update WAVM to be compatible with LLVM 7 through 9 #7774
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this is standard operating procedure on macos
LLVM 7.0 & 7.0.1 suffer from an ABI incompatibility between GCC & Clang. If LLVM is built with GCC (as is the case for system-provided LLVMs in RHEL, Ubuntu, etc) using LLVM with a GCC compiled binary will result in a runtime fault. For more information see LLVM bug 39427 This workaround detects when Clang is being used to compile EOSIO with LLVM < 7.1 and compiles a “shim” with g++ to call the troublesome function that suffers from the ABI incompatibility. This workaround is operating under the assumption that LLVM 7.0 or 7.0.1 was compiled with g++ which it will be for any of EOSIO’s supported distros.
at the moment just build llvm8 from source, pending scl getting llvm-toolset-7.0 still
[Delta Test] v1.8.0-rc1-1169-g26a199017 vs v1.8.2 |
swatanabe-b1
reviewed
Sep 4, 2019
swatanabe-b1
approved these changes
Sep 9, 2019
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.
Provided the tests pass, whenever they finish, this looks good.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Description
WAVM as used in EOSIO requires LLVM 4.0 -- nothing higher nor lower. This requirement is starting to become a little cumbersome: most distros don't provide an llvm4 package (Ubuntu's last was in 18.10) and building llvm4 from source with recent gcc versions requires patching llvm's source code. Plus, requiring LLVM 4 will conflict with potential new wasm runtimes.
This PR updates WAVM to use LLVM APIs compatible from version 7 to 9.
Consensus Changes
API Changes
Documentation Additions