diff --git a/bazel/foreign_cc/zlib_ng.patch b/bazel/foreign_cc/zlib_ng.patch index 77b04ef09496c..b4b73279da3f6 100644 --- a/bazel/foreign_cc/zlib_ng.patch +++ b/bazel/foreign_cc/zlib_ng.patch @@ -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__) @@ -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) diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index 6bcf91fad142d..011884c72c37f 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -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( diff --git a/test/extensions/common/wasm/wasm_test.cc b/test/extensions/common/wasm/wasm_test.cc index 2e947bc33e814..4e358f3d8e5f6 100644 --- a/test/extensions/common/wasm/wasm_test.cc +++ b/test/extensions/common/wasm/wasm_test.cc @@ -569,13 +569,8 @@ TEST_P(WasmCommonTest, Foreign) { wasm->setCreateContextForTesting( nullptr, [](Wasm* wasm, const std::shared_ptr& 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);