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 59
59
60
60
strategy :
61
61
matrix :
62
- # TODO(mathetake): Add other runtimes .
63
- runtime : [ "wamr", "wasmtime" ]
62
+ # TODO(mathetake): Add V8 .
63
+ runtime : [ "wamr", "wasmtime", "wavm" ]
64
64
65
65
steps :
66
66
- uses : actions/checkout@v2
69
69
uses : actions/cache@v1
70
70
with :
71
71
path : " /home/runner/.cache/bazel"
72
- key : bazel-${{ matrix.runtime }}
72
+ key : bazel-${{ matrix.runtime }}-
73
73
74
74
- name : Test
75
75
run : |
Original file line number Diff line number Diff line change @@ -78,13 +78,12 @@ cc_library(
78
78
cc_library (
79
79
name = "wavm_lib" ,
80
80
srcs = glob ([
81
- # TODO(@mathetake): Add WAVM lib.
82
- # "src/wavm/*.h",
83
- # "src/wavm/*.cc",
81
+ "src/wavm/*.h" ,
82
+ "src/wavm/*.cc" ,
84
83
]),
85
84
deps = [
86
85
":common_lib" ,
87
- # TODO(@mathetake): Add WAVM lib.
86
+ "@wavm//:wavm_lib" ,
88
87
],
89
88
)
90
89
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ package(default_visibility = ["//visibility:public"])
7
7
filegroup(
8
8
name = "srcs",
9
9
srcs = glob(["**"]),
10
- visibility = ["//visibility:public"],
11
10
)
12
11
13
12
cmake(
46
45
},
47
46
lib_source = ":srcs",
48
47
out_static_libs = [
49
- # Order from llvm-config --libnames.
50
48
"libLLVMInterpreter.a",
51
49
"libLLVMWindowsManifest.a",
52
50
"libLLVMLibDriver.a",
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ package(default_visibility = ["//visibility:public"])
7
7
filegroup(
8
8
name = "srcs",
9
9
srcs = glob(["**"]),
10
- visibility = ["//visibility:public"],
11
10
)
12
11
13
12
cmake(
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():
90
90
patch_args = ["-p1" ],
91
91
patches = ["@proxy_wasm_cpp_host//bazel/external:llvm.patch" ],
92
92
)
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