Skip to content
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
19 changes: 10 additions & 9 deletions bazel/foreign_cc/zlib_ng.patch
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@

# Add support for compiling to WebAssembly using Emscripten.
# https://github.com/zlib-ng/zlib-ng/pull/794
diff --git a/cmake/detect-arch.c b/cmake/detect-arch.c
index 5715535..2137691 100644

--- a/cmake/detect-arch.c
+++ b/cmake/detect-arch.c
@@ -93,6 +93,10 @@
#elif defined(__THW_RS6000)
#error archfound rs6000
@@ -101,6 +101,10 @@
#error archfound riscv32
#endif

+// Emscripten (WebAssembly)
+#elif defined(__EMSCRIPTEN__)
Expand All @@ -16,16 +17,16 @@ index 5715535..2137691 100644
#else
#error archfound unrecognized
diff --git a/cmake/detect-arch.cmake b/cmake/detect-arch.cmake
index b80d666..c6cc214 100644

--- a/cmake/detect-arch.cmake
+++ b/cmake/detect-arch.cmake
@@ -85,6 +85,9 @@ elseif("${ARCH}" MATCHES "parisc")
@@ -85,6 +85,9 @@
elseif("${ARCH}" MATCHES "rs6000")
set(BASEARCH "rs6000")
set(BASEARCH_RS6000_FOUND TRUE)
+elseif("${ARCH}" MATCHES "wasm32")
+ set(BASEARCH "wasm32")
+ set(BASEARCH_WASM32_FOUND TRUE)
else()
set(BASEARCH "x86")
set(BASEARCH_X86_FOUND TRUE)
elseif("${ARCH}" MATCHES "riscv(32|64)")
set(BASEARCH "riscv")
set(BASEARCH_RISCV_FOUND TRUE)
6 changes: 3 additions & 3 deletions bazel/repository_locations.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -454,12 +454,12 @@ REPOSITORY_LOCATIONS_SPEC = dict(
project_name = "zlib-ng",
project_desc = "zlib fork (higher performance)",
project_url = "https://github.com/zlib-ng/zlib-ng",
version = "b802a303ce8b6c86fbe3f93d59e0a82333768c0c",
sha256 = "e051eade607ecbbfa2c7ed3087fe53e5d3a58325375e1e28209594138e4aa93d",
version = "2.0.5",
sha256 = "eca3fe72aea7036c31d00ca120493923c4d5b99fe02e6d3322f7c88dbdcd0085",
strip_prefix = "zlib-ng-{version}",
urls = ["https://github.com/zlib-ng/zlib-ng/archive/{version}.tar.gz"],
use_category = ["controlplane", "dataplane_core"],
release_date = "2020-10-18",
release_date = "2021-06-25",
cpe = "N/A",
),
com_github_jbeder_yaml_cpp = dict(
Expand Down
5 changes: 0 additions & 5 deletions test/extensions/common/wasm/wasm_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -569,13 +569,8 @@ TEST_P(WasmCommonTest, Foreign) {
wasm->setCreateContextForTesting(
nullptr, [](Wasm* wasm, const std::shared_ptr<Plugin>& plugin) -> ContextBase* {
auto root_context = new TestContext(wasm, plugin);
#ifdef ZLIBNG_VERSION
EXPECT_CALL(*root_context, log_(spdlog::level::trace, Eq("compress 2000 -> 22")));
EXPECT_CALL(*root_context, log_(spdlog::level::debug, Eq("uncompress 22 -> 2000")));
#else
EXPECT_CALL(*root_context, log_(spdlog::level::trace, Eq("compress 2000 -> 23")));
EXPECT_CALL(*root_context, log_(spdlog::level::debug, Eq("uncompress 23 -> 2000")));
#endif
return root_context;
});
wasm->start(plugin);
Expand Down