-
Notifications
You must be signed in to change notification settings - Fork 73
build: enable WAMR and WAVM runtimes. #162
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
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
9337c10
build: enable WAMR and LLVM builds.
mathetake fe09128
Add WAVM.
mathetake 26a0890
Use clang.
mathetake 8357bea
Fix test path
mathetake 9d15fb0
Cache on runtime dependency versions.
mathetake 8296f8e
Fix WAVM build and disable runtime_test temporarily.
mathetake cf4978d
Fix bazelrc.
mathetake 0e077c4
Fix runtime name.
mathetake 5770ad4
review: add Ninja options.
mathetake 6abbc2d
Merge remote-tracking branch 'origin/master' into llvm-wamr
mathetake c67261f
review: remove deprecated options, LLVM patch.
mathetake 117534a
Use cache@v2 for better compression
mathetake db4b0ce
Fix runtime tests.
mathetake 180cfd0
Fix WAVM build with unresolved TODO.
mathetake 72a8153
review: use simple cache key.
mathetake f3d9496
Update WAMR and use Ninja.
mathetake 90dc748
review: Delete trap2 test.
mathetake 0bb696f
Add missing header in NullVm.
mathetake cb274d3
review: restore seprate trap2 test with TODO for WAVM and fix nits.
mathetake 86002c8
Merge remote-tracking branch 'origin/master' into llvm-wamr
mathetake 6fed6fe
review: fix style.
mathetake 502c42e
try removing -v.
mathetake 7492878
review: disable LLVM benchmark build.
mathetake cb4a607
Merge branch 'master' into llvm-wamr
PiotrSikora 7822e89
Fix merge (missing new line at the end).
PiotrSikora d6ba6ab
review: use --per_file_copt.
PiotrSikora 6cf8d7b
review: wipe cache.
PiotrSikora File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 file contains hidden or 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 file contains hidden or 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 file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake") | ||
|
||
licenses(["notice"]) # Apache 2 | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
filegroup( | ||
name = "srcs", | ||
srcs = glob(["**"]), | ||
) | ||
|
||
cmake( | ||
name = "llvm_lib", | ||
mathetake marked this conversation as resolved.
Show resolved
Hide resolved
|
||
cache_entries = { | ||
# Disable both: BUILD and INCLUDE, since some of the INCLUDE | ||
# targets build code instead of only generating build files. | ||
"LLVM_BUILD_BENCHMARKS": "off", | ||
"LLVM_INCLUDE_BENCHMARKS": "off", | ||
"LLVM_BUILD_DOCS": "off", | ||
"LLVM_INCLUDE_DOCS": "off", | ||
"LLVM_BUILD_EXAMPLES": "off", | ||
"LLVM_INCLUDE_EXAMPLES": "off", | ||
PiotrSikora marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"LLVM_BUILD_RUNTIME": "off", | ||
"LLVM_BUILD_RUNTIMES": "off", | ||
"LLVM_INCLUDE_RUNTIMES": "off", | ||
"LLVM_BUILD_TESTS": "off", | ||
"LLVM_INCLUDE_TESTS": "off", | ||
"LLVM_BUILD_TOOLS": "off", | ||
"LLVM_INCLUDE_TOOLS": "off", | ||
"LLVM_BUILD_UTILS": "off", | ||
"LLVM_INCLUDE_UTILS": "off", | ||
"LLVM_ENABLE_LIBEDIT": "off", | ||
"LLVM_ENABLE_LIBXML2": "off", | ||
"LLVM_ENABLE_TERMINFO": "off", | ||
"LLVM_ENABLE_ZLIB": "off", | ||
"LLVM_TARGETS_TO_BUILD": "X86", | ||
# Workaround for the issue with statically linked libstdc++ | ||
# using -l:libstdc++.a. | ||
"CMAKE_CXX_FLAGS": "-lstdc++", | ||
}, | ||
env_vars = { | ||
# Workaround for the -DDEBUG flag added in fastbuild on macOS, | ||
# which conflicts with DEBUG macro used in LLVM. | ||
"CFLAGS": "-UDEBUG", | ||
"CXXFLAGS": "-UDEBUG", | ||
"ASMFLAGS": "-UDEBUG", | ||
}, | ||
generate_args = ["-GNinja"], | ||
lib_source = ":srcs", | ||
out_static_libs = [ | ||
"libLLVMInterpreter.a", | ||
"libLLVMWindowsManifest.a", | ||
"libLLVMLibDriver.a", | ||
"libLLVMObjectYAML.a", | ||
"libLLVMCoverage.a", | ||
"libLLVMLineEditor.a", | ||
"libLLVMDlltoolDriver.a", | ||
"libLLVMOption.a", | ||
"libLLVMTableGen.a", | ||
"libLLVMFuzzMutate.a", | ||
"libLLVMSymbolize.a", | ||
"libLLVMCoroutines.a", | ||
"libLLVMDebugInfoPDB.a", | ||
"libLLVMLTO.a", | ||
"libLLVMObjCARCOpts.a", | ||
"libLLVMMIRParser.a", | ||
"libLLVMOrcJIT.a", | ||
"libLLVMOrcError.a", | ||
"libLLVMJITLink.a", | ||
"libLLVMPasses.a", | ||
"libLLVMipo.a", | ||
"libLLVMInstrumentation.a", | ||
"libLLVMVectorize.a", | ||
"libLLVMLinker.a", | ||
"libLLVMIRReader.a", | ||
"libLLVMAsmParser.a", | ||
"libLLVMX86Disassembler.a", | ||
"libLLVMX86AsmParser.a", | ||
"libLLVMX86CodeGen.a", | ||
"libLLVMCFGuard.a", | ||
"libLLVMGlobalISel.a", | ||
"libLLVMSelectionDAG.a", | ||
"libLLVMAsmPrinter.a", | ||
"libLLVMDebugInfoDWARF.a", | ||
"libLLVMCodeGen.a", | ||
"libLLVMScalarOpts.a", | ||
"libLLVMInstCombine.a", | ||
"libLLVMAggressiveInstCombine.a", | ||
"libLLVMTransformUtils.a", | ||
"libLLVMBitWriter.a", | ||
"libLLVMX86Desc.a", | ||
"libLLVMMCDisassembler.a", | ||
"libLLVMX86Utils.a", | ||
"libLLVMX86Info.a", | ||
"libLLVMMCJIT.a", | ||
"libLLVMExecutionEngine.a", | ||
"libLLVMTarget.a", | ||
"libLLVMAnalysis.a", | ||
"libLLVMProfileData.a", | ||
"libLLVMRuntimeDyld.a", | ||
"libLLVMObject.a", | ||
"libLLVMTextAPI.a", | ||
"libLLVMMCParser.a", | ||
"libLLVMBitReader.a", | ||
"libLLVMMC.a", | ||
"libLLVMDebugInfoCodeView.a", | ||
"libLLVMDebugInfoMSF.a", | ||
"libLLVMCore.a", | ||
"libLLVMRemarks.a", | ||
"libLLVMBitstreamReader.a", | ||
"libLLVMBinaryFormat.a", | ||
"libLLVMSupport.a", | ||
"libLLVMDemangle.a", | ||
], | ||
) |
This file contains hidden or 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 file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,31 @@ | ||
licenses(["notice"]) # Apache 2 | ||
|
||
load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake") | ||
|
||
licenses(["notice"]) # Apache 2 | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
filegroup( | ||
name = "srcs", | ||
srcs = glob(["**"]), | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
cmake( | ||
name = "libiwasm", | ||
name = "wamr_lib", | ||
cache_entries = { | ||
"LLVM_DIR": "$EXT_BUILD_DEPS/copy_llvm/llvm/lib/cmake/llvm", | ||
"WAMR_BUILD_INTERP": "1", | ||
"WAMR_BUILD_JIT": "0", | ||
"WAMR_BUILD_AOT": "0", | ||
"WAMR_BUILD_SIMD": "0", | ||
"WAMR_BUILD_MULTI_MODULE": "1", | ||
"WAMR_BUILD_LIBC_WASI": "0", | ||
"WAMR_BUILD_TAIL_CALL": "1", | ||
}, | ||
defines = ["WASM_WAMR"], | ||
generate_args = ["-GNinja"], | ||
lib_source = ":srcs", | ||
out_shared_libs = ["libiwasm.so"], | ||
out_static_libs = ["libvmlib.a"], | ||
deps = [ | ||
"@llvm//:llvm_lib", | ||
], | ||
) |
This file contains hidden or 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 file contains hidden or 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 file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake") | ||
|
||
licenses(["notice"]) # Apache 2 | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
filegroup( | ||
name = "srcs", | ||
srcs = glob(["**"]), | ||
) | ||
|
||
cmake( | ||
name = "wavm_lib", | ||
cache_entries = { | ||
"LLVM_DIR": "$EXT_BUILD_DEPS/copy_llvm/llvm/lib/cmake/llvm", | ||
"WAVM_ENABLE_STATIC_LINKING": "on", | ||
"WAVM_ENABLE_RELEASE_ASSERTS": "on", | ||
"WAVM_ENABLE_UNWIND": "on", | ||
# Workaround for the issue with statically linked libstdc++ | ||
# using -l:libstdc++.a. | ||
"CMAKE_CXX_FLAGS": "-lstdc++ -Wno-unused-command-line-argument", | ||
}, | ||
defines = ["WASM_WAVM"], | ||
env_vars = { | ||
# Workaround for the -DDEBUG flag added in fastbuild on macOS, | ||
# which conflicts with DEBUG macro used in LLVM. | ||
"CFLAGS": "-UDEBUG", | ||
"CXXFLAGS": "-UDEBUG", | ||
"ASMFLAGS": "-UDEBUG", | ||
}, | ||
generate_args = ["-GNinja"], | ||
lib_source = ":srcs", | ||
out_static_libs = [ | ||
"libWAVM.a", | ||
"libWAVMUnwind.a", | ||
], | ||
deps = ["@llvm//:llvm_lib"], | ||
) |
This file contains hidden or 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 file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
|
||
#include <string.h> | ||
|
||
#include <limits> | ||
#include <memory> | ||
#include <unordered_map> | ||
#include <utility> | ||
|
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.