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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ NAPI_NATIVE_TEST_OUT_DIR ?= $(abspath $(BUILD_WASIX_NAPI_DIR)/native)
NAPI_WASIX_TEST_OUT_DIR ?= $(abspath $(BUILD_WASIX_NAPI_DIR)/wasm32-wasix/release)
NAPI_V8_CTEST_ARGS ?= -E 'SandboxGlobalThisAndMarkerAreNotEnumerableForDeepFreeze'
NAPI_QUICKJS_CTEST_ARGS ?= -E 'SandboxGlobalThisAndMarkerAreNotEnumerableForDeepFreeze'
NAPI_V8_PREBUILT_VERSION ?= 11.9.8
NAPI_V8_PREBUILT_VERSION ?= 11.9.9
NAPI_V8_PLATFORM :=
NAPI_V8_DIST_ROOT ?=
NAPI_V8_CARGO_DIST_ROOT ?=
Expand Down
5 changes: 4 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::{
path::{Path, PathBuf},
};

const PREBUILT_V8_VERSION: &str = "11.9.8";
const PREBUILT_V8_VERSION: &str = "11.9.9";

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
enum V8Method {
Expand Down Expand Up @@ -219,6 +219,9 @@ fn main() {
println!("cargo:rustc-link-lib=dylib=m");
println!("cargo:rustc-link-lib=dylib=pthread");
println!("cargo:rustc-link-lib=dylib=rt");
if target_os == "linux" && env::var("CARGO_CFG_TARGET_ARCH").as_deref() == Ok("aarch64") {
println!("cargo:rustc-link-lib=dylib=atomic");
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/build-test-native.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail

PREBUILT_V8_VERSION="11.9.8"
PREBUILT_V8_VERSION="11.9.9"

if [[ $# -ne 1 ]]; then
echo "usage: $0 <test-name>" >&2
Expand Down
22 changes: 19 additions & 3 deletions v8/cmake/NapiV8Resolver.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(NAPI_V8_PREBUILT_VERSION "11.9.8")
set(NAPI_V8_PREBUILT_VERSION "11.9.9")
set(NAPI_V8_PREBUILT_BASE_URL
"https://github.com/wasmerio/v8-custom-builds/releases/download/${NAPI_V8_PREBUILT_VERSION}")

Expand Down Expand Up @@ -66,6 +66,12 @@ function(_napi_v8_local_strategy out_ok out_include out_library out_extra out_de
break()
endif()
endforeach()
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND _extra STREQUAL "")
set(_extra "pthread;dl;m;rt")
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" OR
CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
list(PREPEND _extra "atomic")
endif()
endif()

if(_include STREQUAL "")
Expand Down Expand Up @@ -195,8 +201,18 @@ function(_napi_v8_prebuilt_strategy out_ok out_include out_library out_extra out
set(_defines "${defines_override}")
endif()

if(extra_override STREQUAL "" AND CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(_extra "/System/Library/Frameworks/CoreFoundation.framework")
if(extra_override STREQUAL "")
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(_extra "/System/Library/Frameworks/CoreFoundation.framework")
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(_extra "pthread;dl;m;rt")
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" OR
CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
list(PREPEND _extra "atomic")
endif()
else()
set(_extra "")
endif()
else()
set(_extra "${extra_override}")
endif()
Expand Down
Loading