Skip to content

Commit 18e8d38

Browse files
authored
wavm: fix build with Clang 13. (#227)
Signed-off-by: Piotr Sikora <[email protected]>
1 parent 5785e92 commit 18e8d38

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

bazel/external/wavm.patch

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Fix build with Clang 13. (https://github.com/WAVM/WAVM/pull/332)
2+
3+
diff --git a/Lib/Platform/POSIX/ThreadPOSIX.cpp b/Lib/Platform/POSIX/ThreadPOSIX.cpp
4+
index e1f232f6..d3241349 100644
5+
--- a/Lib/Platform/POSIX/ThreadPOSIX.cpp
6+
+++ b/Lib/Platform/POSIX/ThreadPOSIX.cpp
7+
@@ -173,6 +173,7 @@ WAVM_NO_ASAN static void touchStackPages(U8* minAddr, Uptr numBytesPerPage)
8+
sum += *touchAddr;
9+
if(touchAddr < minAddr + numBytesPerPage) { break; }
10+
}
11+
+ WAVM_SUPPRESS_UNUSED(sum);
12+
}
13+
14+
bool Platform::initThreadAndGlobalSignalsOnce()

bazel/repositories.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ def proxy_wasm_cpp_host_repositories():
117117
sha256 = "bf2b2aec8a4c6a5413081c0527cb40dd16cb67e9c74a91f8a82fe1cf27a3c5d5",
118118
strip_prefix = "WAVM-c8997ebf154f3b42e688e670a7d0fa045b7a32a0",
119119
url = "https://github.com/WAVM/WAVM/archive/c8997ebf154f3b42e688e670a7d0fa045b7a32a0.tar.gz",
120+
patches = ["@proxy_wasm_cpp_host//bazel/external:wavm.patch"],
121+
patch_args = ["-p1"],
120122
)
121123

122124
native.bind(

0 commit comments

Comments
 (0)