Skip to content

wavm: fix build with Clang 13. #227

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 1 commit into from
Jan 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions bazel/external/wavm.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Fix build with Clang 13. (https://github.com/WAVM/WAVM/pull/332)

diff --git a/Lib/Platform/POSIX/ThreadPOSIX.cpp b/Lib/Platform/POSIX/ThreadPOSIX.cpp
index e1f232f6..d3241349 100644
--- a/Lib/Platform/POSIX/ThreadPOSIX.cpp
+++ b/Lib/Platform/POSIX/ThreadPOSIX.cpp
@@ -173,6 +173,7 @@ WAVM_NO_ASAN static void touchStackPages(U8* minAddr, Uptr numBytesPerPage)
sum += *touchAddr;
if(touchAddr < minAddr + numBytesPerPage) { break; }
}
+ WAVM_SUPPRESS_UNUSED(sum);
}

bool Platform::initThreadAndGlobalSignalsOnce()
2 changes: 2 additions & 0 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ def proxy_wasm_cpp_host_repositories():
sha256 = "bf2b2aec8a4c6a5413081c0527cb40dd16cb67e9c74a91f8a82fe1cf27a3c5d5",
strip_prefix = "WAVM-c8997ebf154f3b42e688e670a7d0fa045b7a32a0",
url = "https://github.com/WAVM/WAVM/archive/c8997ebf154f3b42e688e670a7d0fa045b7a32a0.tar.gz",
patches = ["@proxy_wasm_cpp_host//bazel/external:wavm.patch"],
patch_args = ["-p1"],
)

native.bind(
Expand Down