File tree Expand file tree Collapse file tree 6 files changed +52
-10
lines changed
Expand file tree Collapse file tree 6 files changed +52
-10
lines changed Original file line number Diff line number Diff line change 5959
6060 strategy :
6161 matrix :
62- # TODO(mathetake): Add other runtimes .
63- runtime : [ "wamr", "wasmtime" ]
62+ # TODO(mathetake): Add V8 .
63+ runtime : [ "wamr", "wasmtime", "wavm" ]
6464
6565 steps :
6666 - uses : actions/checkout@v2
6969 uses : actions/cache@v1
7070 with :
7171 path : " /home/runner/.cache/bazel"
72- key : bazel-${{ matrix.runtime }}
72+ key : bazel-${{ matrix.runtime }}-clang
7373
7474 - name : Test
7575 run : |
Original file line number Diff line number Diff line change @@ -78,13 +78,12 @@ cc_library(
7878cc_library (
7979 name = "wavm_lib" ,
8080 srcs = glob ([
81- # TODO(@mathetake): Add WAVM lib.
82- # "src/wavm/*.h",
83- # "src/wavm/*.cc",
81+ "src/wavm/*.h" ,
82+ "src/wavm/*.cc" ,
8483 ]),
8584 deps = [
8685 ":common_lib" ,
87- # TODO(@mathetake): Add WAVM lib.
86+ "@wavm//:wavm_lib" ,
8887 ],
8988)
9089
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ package(default_visibility = ["//visibility:public"])
77filegroup(
88 name = "srcs",
99 srcs = glob(["**"]),
10- visibility = ["//visibility:public"],
1110)
1211
1312cmake(
4645 },
4746 lib_source = ":srcs",
4847 out_static_libs = [
49- # Order from llvm-config --libnames.
5048 "libLLVMInterpreter.a",
5149 "libLLVMWindowsManifest.a",
5250 "libLLVMLibDriver.a",
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ package(default_visibility = ["//visibility:public"])
77filegroup(
88 name = "srcs",
99 srcs = glob(["**"]),
10- visibility = ["//visibility:public"],
1110)
1211
1312cmake(
Original file line number Diff line number Diff line change 1+ load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake")
2+
3+ licenses(["notice"]) # Apache 2
4+
5+ package(default_visibility = ["//visibility:public"])
6+
7+ filegroup(
8+ name = "srcs",
9+ srcs = glob(["**"]),
10+ )
11+
12+ cmake(
13+ name = "wavm_lib",
14+ binaries = ["wavm"],
15+ cache_entries = {
16+ "LLVM_DIR": "$EXT_BUILD_DEPS/copy_llvm/llvm/lib/cmake/llvm",
17+ "WAVM_ENABLE_STATIC_LINKING": "on",
18+ "WAVM_ENABLE_RELEASE_ASSERTS": "on",
19+ "WAVM_ENABLE_UNWIND": "on",
20+ # Workaround for the issue with statically linked libstdc++
21+ # using -l:libstdc++.a.
22+ "CMAKE_CXX_FLAGS": "-lstdc++ -Wno-unused-command-line-argument",
23+ },
24+ defines = ["WASM_WAVM"],
25+ env_vars = {
26+ # Workaround for the -DDEBUG flag added in fastbuild on macOS,
27+ # which conflicts with DEBUG macro used in LLVM.
28+ "CFLAGS": "-UDEBUG",
29+ "CXXFLAGS": "-UDEBUG",
30+ "ASMFLAGS": "-UDEBUG",
31+ },
32+ lib_source = ":srcs",
33+ static_libraries = [
34+ "libWAVM.a",
35+ "libWAVMUnwind.a",
36+ ],
37+ deps = ["@llvm//:llvm_lib"],
38+ )
Original file line number Diff line number Diff line change @@ -90,3 +90,11 @@ def proxy_wasm_cpp_host_repositories():
9090 patch_args = ["-p1" ],
9191 patches = ["@proxy_wasm_cpp_host//bazel/external:llvm.patch" ],
9292 )
93+
94+ http_archive (
95+ name = "wavm" ,
96+ build_file = "@proxy_wasm_cpp_host//bazel/external:wavm.BUILD" ,
97+ sha256 = "ce899269516313b400005a8cc9bc3bcd8329663f43f7b4baae211ea0cd456a39" ,
98+ strip_prefix = "WAVM-79c3aa29366615d9b1593cd527e5b4b94cc6072a" ,
99+ url = "https://github.com/WAVM/WAVM/archive/79c3aa29366615d9b1593cd527e5b4b94cc6072a.tar.gz" ,
100+ )
You can’t perform that action at this time.
0 commit comments