Skip to content

Commit 05b0cf2

Browse files
committed
WasmEdge: Add the boost dependency.
Signed-off-by: YiYing He <[email protected]>
1 parent 7fcbe18 commit 05b0cf2

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

bazel/external/boost.BUILD

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
load("@rules_cc//cc:defs.bzl", "cc_library")
2+
3+
licenses(["notice"]) # Apache 2
4+
5+
cc_library(
6+
name = "boost_headers",
7+
hdrs = glob(["include/boost/**"]),
8+
visibility = ["//visibility:public"],
9+
includes = ['include'],
10+
)

bazel/external/wasmedge.BUILD

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ filegroup(
1212
cmake(
1313
name = "wasmedge_lib",
1414
cache_entries = {
15+
"Boost_NO_SYSTEM_PATHS": "TRUE",
16+
"BOOST_INCLUDEDIR": "$EXT_BUILD_DEPS/copy_boost/",
1517
"CMAKE_BUILD_TYPE": "Release",
1618
"WASMEDGE_BUILD_AOT_RUNTIME": "OFF",
1719
"WASMEDGE_BUILD_SHARED_LIB": "OFF",
@@ -24,4 +26,7 @@ cmake(
2426
out_static_libs = [
2527
"libwasmedge_c.a",
2628
],
29+
deps = [
30+
'@boost//:boost_headers',
31+
],
2732
)

bazel/repositories.bzl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,14 @@ def proxy_wasm_cpp_host_repositories():
112112
actual = "@com_github_wavm_wavm//:wavm_lib",
113113
)
114114

115+
http_archive(
116+
name = "boost",
117+
build_file = "@proxy_wasm_cpp_host//bazel/external:boost.BUILD",
118+
sha256 = "7bd7ddceec1a1dfdcbdb3e609b60d01739c38390a5f956385a12f3122049f0ca",
119+
strip_prefix = "boost_1_76_0",
120+
url = "https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz",
121+
)
122+
115123
http_archive(
116124
name = "com_github_wasmedge_wasmedge",
117125
build_file = "@proxy_wasm_cpp_host//bazel/external:wasmedge.BUILD",

0 commit comments

Comments
 (0)