From 4037638c8e2175abd35000e3cbacefac40e63fa3 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Tue, 30 Jan 2024 22:06:15 -0300 Subject: [PATCH] fixup --- .github/workflows/release.yml | 1 + Makefile | 1 + config | 6 +++++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9bfe2fff6..ab283cb7f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -390,6 +390,7 @@ jobs: WASMTIME_VER: ${{ needs.setup.outputs.wasmtime_ver }} WASMER_VER: ${{ needs.setup.outputs.wasmer_ver }} V8_VER: ${{ needs.setup.outputs.v8_ver }} + NGX_WASM_RUNTIME_V8_NEEDS_LIBATOMIC: 0 steps: - uses: actions/checkout@v3 - name: Setup dependencies diff --git a/Makefile b/Makefile index 817e6ffb0..0c52fda91 100644 --- a/Makefile +++ b/Makefile @@ -40,6 +40,7 @@ export NGX_WASM_RUNTIME_INC ?= export NGX_WASM_RUNTIME_LIB ?= export NGX_WASM_RUNTIME_LD_OPT ?= export NGX_WASM_RUNTIME_NO_RPATH ?= 0 +export NGX_WASM_RUNTIME_V8_NEEDS_LIBATOMIC ?= 1 export NGX_WASM_CARGO ?= 1 export NGX_WASM_CARGO_PROFILE ?= debug diff --git a/config b/config index 208e662ae..845b8144b 100644 --- a/config +++ b/config @@ -31,7 +31,11 @@ case $ngx_wasm_runtime_name in ngx_wasm_runtime_srcs="$ngx_addon_dir/src/wasm/wrt/ngx_wrt_v8.c" ngx_wasm_runtime_lib_name="wee8" ngx_wasm_runtime_pre_libs="-lv8bridge" - ngx_wasm_runtime_post_libs="-ldl -lm -lpthread -lstdc++ -latomic" + ngx_wasm_runtime_post_libs="-ldl -lm -lpthread -lstdc++" + + if [ "$NGX_WASM_RUNTIME_V8_NEEDS_LIBATOMIC" = 1 ]; then + ngx_wasm_runtime_post_libs="-ldl -lm -lpthread -lstdc++ -latomic" + fi ngx_wasm_cargo_lib_name=ngx_wasm_rs ngx_wasm_cargo_lib_dir=$ngx_addon_dir/lib/ngx-wasm-rs