diff --git a/.github/actions/v8/action.yml b/.github/actions/v8/action.yml index 3870cca..04d651b 100644 --- a/.github/actions/v8/action.yml +++ b/.github/actions/v8/action.yml @@ -79,15 +79,21 @@ runs: env: DARWIN: ${{ inputs.platform == 'darwin' }} REF: ${{ inputs.ref }} + PLATFORM: ${{ inputs.platform }} TARGET: ${{ inputs.platform }}.${{ inputs.arch }}.${{ inputs.configuration }} run: | set -u echo ::group::Build v8 - if [ "$DARWIN" = true ]; then - export CLANG_BASE_PATH=$(brew --cellar llvm)/$(brew list --versions llvm | cut -d' ' -f2 | sort -V | head -n1) - fi + case "$PLATFORM" in + darwin) + export CLANG_BASE_PATH=$(brew --cellar llvm)/$(brew list --versions llvm | cut -d' ' -f2 | sort -V | head -n1) + ;; + win32) + export DEPOT_TOOLS_WIN_TOOLCHAIN=0 + ;; + esac v8_build "out/$REF/$TARGET" rm -rf "out/$REF/$TARGET/gen" - find out -type f ! -name '*.so' ! -name '*.a' ! -name '*.h' -delete + find out -type f ! -name '*.a' ! -name '*.h' ! -name '*.lib' -delete find out -type d -empty -delete echo ::endgroup:: diff --git a/.github/actions/v8/gclient-sync/docker/sync b/.github/actions/v8/gclient-sync/docker/sync index 8b48d77..233a768 100755 --- a/.github/actions/v8/gclient-sync/docker/sync +++ b/.github/actions/v8/gclient-sync/docker/sync @@ -3,4 +3,5 @@ set -eu cd deps gclient config --unmanaged "$(git -C v8 config --get remote.origin.url)" +DEPOT_TOOLS_WIN_TOOLCHAIN=0 \ gclient sync --no-history --shallow --with_branch_heads diff --git a/.github/actions/v8/gn/action.yml b/.github/actions/v8/gn/action.yml index 8cadf47..458930a 100644 --- a/.github/actions/v8/gn/action.yml +++ b/.github/actions/v8/gn/action.yml @@ -7,9 +7,10 @@ inputs: runs: using: composite steps: - # Just install depot_tools if not musl + # Just install depot_tools if not musl. The rest is skipped on non-container non-linux platforms + # because `newkdev/setup-depot-tools` is invoked in the v8 action. - shell: sh - if: inputs.platform != 'linux-musl' + if: inputs.platform == 'linux-gnu' run: | DEPOT_TOOLS=$RUNNER_TOOL_CACHE/depot_tools mkdir -p ~/.config/depot_tools diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index f74942b..80e7659 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -9,18 +9,21 @@ env: jobs: # First, check to see if v8 has been built for each target. If not, then a more powerful `runs-on` # builder is used on EC2. + # nb: Windows support w/ runs-on is beta and doesn't include the same tooling as GitHub. # https://runs-on.com # https://github.com/runs-on/runs-on configure: strategy: matrix: host: - - platform: linux-gnu + - runs-on: ubuntu-latest + platform: linux-gnu arch: x64 - - platform: linux-musl + - runs-on: ubuntu-latest + platform: linux-musl arch: x64 name: configure / ${{ matrix.host.platform }} ${{ matrix.host.arch }} - runs-on: ubuntu-latest + runs-on: ${{ matrix.host.runs-on }} outputs: linux-gnu-x64: ${{ steps.output.outputs.linux-gnu-x64 }} linux-musl-x64: ${{ steps.output.outputs.linux-musl-x64 }} @@ -36,11 +39,19 @@ jobs: env: CACHE_HIT: ${{ steps.cache.outputs.cache-hit }} HOST: ${{ matrix.host.platform }}-${{ matrix.host.arch }} + RUNS_ON: ${{ matrix.host.runs-on }} run: | if [ "$CACHE_HIT" = true ]; then - echo "$HOST=ubuntu-latest" >> "$GITHUB_OUTPUT" + echo "$HOST=$RUNS_ON" >> "$GITHUB_OUTPUT" else - echo "$HOST=runs-on,runner=32cpu-linux-x64,run-id=$GITHUB_RUN_ID" >> "$GITHUB_OUTPUT" + case "$RUNS_ON" in + ubuntu-latest) + echo "$HOST=runs-on,runner=32cpu-linux-x64,run-id=$GITHUB_RUN_ID" >> "$GITHUB_OUTPUT" + ;; + windows-latest) + echo "$HOST=runs-on,image=windows22-base-x64,family=m7i,run-id=$GITHUB_RUN_ID" >> "$GITHUB_OUTPUT" + ;; + esac fi # Build isolated-vm @@ -64,6 +75,9 @@ jobs: - runs-on: macos-13 platform: darwin arch: x64 + - runs-on: windows-latest + platform: win32 + arch: x64 name: build / ${{ matrix.host.platform }} ${{ matrix.host.arch }} runs-on: ${{ matrix.host.runs-on }} container: ${{ matrix.host.container }} @@ -105,7 +119,8 @@ jobs: path: ./deps/v8/out # Install toolchain - - uses: laverdet/install@v0.0.6 + - name: Toolchain [Linux] + uses: laverdet/install@v0.0.6 if: startsWith(matrix.host.platform, 'linux-') with: packages: | @@ -119,33 +134,85 @@ jobs: ninja-build nodejs npm - - shell: sh + - name: Toolchain [macOS] if: matrix.host.platform == 'darwin' run: brew install boost cmake llvm ninja node + # On Windows, the POSIX shell in GitHub actions is Git Bash. This runs in an isolated MSYS2 + # installation under `C:/Program Files/Git`. The runner comes with another MSYS2 installation + # in `C:/msys64`. This action adds the root MSYS2 installation higher up in $PATH so we can + # use `pacman`, and consume binaries installed by `pacman`. + # nb: Do not be confused by the `/msys64` directory which exists in the default GitHub shell! + # It is not the same as `C:/msys64`. + - name: Toolchain [Windows] + if: matrix.host.platform == 'win32' + shell: sh + run: | + echo ::group::Toolchain + # You want the mingw version of ninja, not the msys version. The msys version uses + # `CMD.EXE` and does not work with the cmake Ninja generator. + /c/msys64/usr/bin/pacman -S --noconfirm \ + mingw-w64-x86_64-boost \ + mingw64/mingw-w64-x86_64-ninja \ + ; + echo "/c/msys64/mingw64/bin" >> "$GITHUB_PATH" + echo "/c/msys64/usr/bin" >> "$GITHUB_PATH" + echo ::endgroup:: + echo ::group::Dependency Walker + mkdir -p "$RUNNER_TOOL_CACHE/depwalker" + cd "$RUNNER_TOOL_CACHE/depwalker" + # `--ssl-no-revoke`: curl: (35) schannel: next InitializeSecurityContext failed: + # CRYPT_E_REVOCATION_OFFLINE (0x80092013) - The revocation function was unable to check + # revocation because the revocation server was offline. + curl -fsSL --ssl-no-revoke -o depwalker.zip https://github.com/lucasg/Dependencies/releases/download/v1.11.1/Dependencies_x64_Release.zip + unzip depwalker.zip + rm depwalker.zip + echo "$PWD" >> "$GITHUB_PATH" + echo ::endgroup:: + + # Install npm dependencies + - uses: bahmutov/npm-install@v1 + with: + install-command: npm install --no-audit --no-fund + - name: node-addon-api include path + shell: sh + id: node-addon-api + run: echo "include-dir=$(node -p 'require("node-addon-api").include_dir')" >> "$GITHUB_OUTPUT" # Download nodejs headers - - name: nodejs dependencies - id: nodejs + - uses: actions/cache/restore@v4 + id: nodejs-headers-cache + with: + enableCrossOsArchive: true + key: nodejs-headers-${{ env.NODE_HEADERS }} + path: deps/nodejs + - name: node headers + id: nodejs-headers + if: steps.nodejs-headers-cache.outputs.cache-hit != 'true' env: NODE_HEADERS: ${{ env.NODE_HEADERS }} - run: | - set -u - npm install --no-audit --no-fund - echo "napi-include-dir=$(node -p 'require("node-addon-api").include_dir')" >> "$GITHUB_OUTPUT" - echo "node-dist-dir=$(nodejs_select $RUNNER_TOOL_CACHE/nodejs-headers/$NODE_HEADERS)" >> "$GITHUB_OUTPUT" + run: nodejs_select "deps/nodejs/$NODE_HEADERS" + - uses: actions/cache/save@v4 + if: steps.nodejs-headers.outcome == 'success' + with: + enableCrossOsArchive: true + key: ${{ steps.nodejs-headers-cache.outputs.cache-primary-key }} + path: deps/nodejs # Build isolated-vm - name: Configure + shell: sh env: IVM_HOST_ARCH: ${{ matrix.host.arch }} IVM_HOST_PLATFORM: ${{ matrix.host.platform }} - NAPI_INCLUDE_DIR: ${{ steps.nodejs.outputs.napi-include-dir }} - NODE_DIST_DIR: ${{ steps.nodejs.outputs.node-include-dir }} + NAPI_INCLUDE_DIR: ${{ steps.node-addon-api.outputs.include-dir }} + NODE_DIST_DIR: deps/nodejs/${{ env.NODE_HEADERS }} V8_REF: ${{ env.V8_REF }} V8_TARGET: ${{ matrix.host.platform }}.${{ matrix.host.arch }}.${{ env.V8_CONFIGURATION }} run: | set -u V8_REF_PATH=$PWD/deps/v8/out/$V8_REF + CMAKE_MAKE_PROGRAM=ninja + CMAKE_PREFIX_PATH= case "$IVM_HOST_PLATFORM" in darwin) CMAKE_CXX_COMPILER=$(brew --prefix llvm)/bin/clang++ @@ -153,10 +220,18 @@ jobs: linux-*) CMAKE_CXX_COMPILER=$(realpath "$(which clang-18)") ;; + win32) + CMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang++.exe" + # I do not know why cmake cannot find ninja without explicitly being told where it is. + CMAKE_MAKE_PROGRAM=$(which ninja) + CMAKE_PREFIX_PATH=C:/msys64/mingw64/lib/cmake + ;; esac cmake \ - -DCMAKE_CXX_COMPILER="$CMAKE_CXX_COMPILER" \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_COMPILER="$CMAKE_CXX_COMPILER" \ + -DCMAKE_MAKE_PROGRAM="$CMAKE_MAKE_PROGRAM" \ + -DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH" \ -DIVM_HOST_ARCH="$IVM_HOST_ARCH"\ -DIVM_HOST_PLATFORM="$IVM_HOST_PLATFORM" \ -DNAPI_INCLUDE_DIR="$NAPI_INCLUDE_DIR" \ @@ -169,7 +244,28 @@ jobs: -G Ninja \ ; - name: Build + shell: sh run: ninja -C build ivm_backend_v8 + - name: Sanity Check + shell: sh + env: + ARCH: ${{ matrix.host.arch }} + PLATFORM: ${{ matrix.host.platform }} + run: node -e 'require("./dist/backend_v8/${{ matrix.host.platform }}-${{ matrix.host.arch }}/backend_v8.node")' + + # Diagnostics + - name: Symbols [Linux] + if: startsWith(matrix.host.platform, 'linux-') + run: | + set +x + ldd "dist/backend_v8/${{ matrix.host.platform }}-${{ matrix.host.arch }}/backend_v8.node" 2>&1 | grep -v 'Error relocating' + nm -guC "dist/backend_v8/${{ matrix.host.platform }}-${{ matrix.host.arch }}/backend_v8.node" + - name: Symbols [Windows] + shell: sh + if: matrix.host.platform == 'win32' + run: | + set +x + dependencies.exe -imports "dist/backend_v8/${{ matrix.host.platform }}-${{ matrix.host.arch }}/backend_v8.node" # Upload build artifacts - uses: actions/upload-artifact@v4 @@ -199,10 +295,20 @@ jobs: - runs-on: macos-13 platform: darwin arch: x64 + - runs-on: windows-latest + platform: win32 + arch: x64 node: - 18 - 20 - 22 + exclude: + - host: + platform: win32 + node: 20 + - host: + platform: win32 + node: 22 name: test / ${{ matrix.host.platform }} ${{ matrix.host.arch }} nodejs ${{ matrix.node }} runs-on: ${{ matrix.host.runs-on }} container: ${{ matrix.host.container }} @@ -245,16 +351,27 @@ jobs: with: node-version: ${{ matrix.node }} + # Check linked binary sanity + - name: Sanity Check + shell: sh + env: + ARCH: ${{ matrix.host.arch }} + PLATFORM: ${{ matrix.host.platform }} + run: node -e 'require("./dist/backend_v8/${{ matrix.host.platform }}-${{ matrix.host.arch }}/backend_v8.node")' + # Install npm dependencies and build TypeScript + - uses: bahmutov/npm-install@v1 + with: + install-command: npm install --no-audit --no-fund - name: npm + shell: sh run: | - npm install --no-audit --no-fund npx tsc -b + npm config set script-shell "$SHELL" # Run tests - name: Test - run: | - npm run -S test + run: npm run -S test release: needs: test @@ -274,6 +391,9 @@ jobs: - runs-on: macos-13 platform: darwin arch: x64 + - runs-on: windows-latest + platform: win32 + arch: x64 name: release / ${{ matrix.host.platform }} ${{ matrix.host.arch }} runs-on: ${{ matrix.host.runs-on }} permissions: diff --git a/CMakeLists.txt b/CMakeLists.txt index e15aa1f..072e41a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,6 +30,13 @@ if (NOT DEFINED V8_OUT_PATH) message(FATAL_ERROR "V8_OUT_PATH is not set") endif() +# Ensure absolute path for variables used in subdirectories +cmake_path(ABSOLUTE_PATH NAPI_INCLUDE_DIR BASE_DIRECTORY ${CMAKE_SOURCE_DIR}) +cmake_path(ABSOLUTE_PATH NODE_DIST_DIR BASE_DIRECTORY ${CMAKE_SOURCE_DIR}) +cmake_path(ABSOLUTE_PATH V8_INCLUDE_DIR BASE_DIRECTORY ${CMAKE_SOURCE_DIR}) +cmake_path(ABSOLUTE_PATH V8_INCLUDE_GN_FILE BASE_DIRECTORY ${CMAKE_SOURCE_DIR}) +cmake_path(ABSOLUTE_PATH V8_OUT_PATH BASE_DIRECTORY ${CMAKE_SOURCE_DIR}) + # Project config project(isolated_vm LANGUAGES CXX) @@ -42,45 +49,79 @@ set(CMAKE_CXX_EXTENSIONS OFF) # Global compiler flags set(CMAKE_POSITION_INDEPENDENT_CODE ON) -add_compile_options( - -fdiagnostics-color - -Wall - -Wextra - -Wpedantic -) -if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - # `std::stop_token` and maybe others - add_compile_definitions(_LIBCPP_ENABLE_EXPERIMENTAL) - # Required for clangd w/ modules - add_compile_options(-fretain-comments-from-system-headers) - # This enables `#include ` somehow - if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 20) - add_compile_options(-D__cpp_concepts=202002L -Wno-builtin-macro-redefined) - endif() + +# No warnings allowed in release +if (NOT CMAKE_BUILD_TYPE STREQUAL Debug) + set(CMAKE_COMPILE_WARNING_AS_ERROR ON) endif() + +# Apple dylib flags if (APPLE) set(CMAKE_SHARED_LINKER_FLAGS "-dynamiclib -undefined dynamic_lookup") - set(CMAKE_OSX_DEPLOYMENT_TARGET "10.12") + set(CMAKE_OSX_DEPLOYMENT_TARGET 10.12) endif() -# Release type compiler flags -if (CMAKE_BUILD_TYPE STREQUAL "Debug") - add_compile_options( - -fsanitize=address - -Wno-unused-but-set-variable - -Wno-unused-result - ) - add_link_options( - -fsanitize=address - -shared-libasan - ) -else() - # clang-18 complains about `std::aligned_storage` within `std::shared_ptr` compiling against - # libstdc++ +# Microsoft Visual C++. It can't actually compile the templates in `ivm::value`, but this would be +# required if it could. +if (MSVC) + # Lmfao: "After 20+ years, we’re finally able to set the value for “__cplusplus” macro forward in + # the MSVC compiler." + # https://developercommunity.visualstudio.com/t/msvc-incorrectly-defines-cplusplus/139261#T-N223868 + # https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus?view=msvc-170 + add_compile_options(/Zc:__cplusplus) +endif() + +# Windows flags. You want /MT and not /MD +if (WIN32 AND NOT CMAKE_BUILD_TYPE STREQUAL Debug) + set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded) +endif() + +# Windows Clang flags +if (WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL Clang) + # error: unknown attribute 'no_unique_address' ignored [-Werror,-Wunknown-attributes] + # [[no_unique_address]] Predicate predicate; + add_compile_options(-Wno-unknown-attributes) +endif() + +# Clang & GCC diagnostic flags. GCC can't compile this project right now but I am hopeful. +if (CMAKE_CXX_COMPILER_ID STREQUAL Clang OR CMAKE_CXX_COMPILER_ID STREQUAL GNU) add_compile_options( - -Wno-deprecated-declarations + -fdiagnostics-color + -Wall + -Wextra + -Wpedantic ) - set(CMAKE_COMPILE_WARNING_AS_ERROR ON) + if (NOT CMAKE_BUILD_TYPE STREQUAL Debug) + # Soften common development warnings + add_compile_options( + -Wno-unused-but-set-variable + -Wno-unused-result + ) + endif() +endif() + +# Clang feature flags +if (CMAKE_CXX_COMPILER_ID STREQUAL Clang) + # `std::stop_token` and maybe others + add_compile_definitions(_LIBCPP_ENABLE_EXPERIMENTAL) + # This enables `#include ` somehow. This can be removed in Clang 19.1.0. + if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 20) + add_compile_options(-D__cpp_concepts=202002L -Wno-builtin-macro-redefined) + endif() + + # Debug / Release configuration flags + if (CMAKE_BUILD_TYPE STREQUAL Debug) + # Required for clangd w/ modules + add_compile_options(-fretain-comments-from-system-headers) + + # Enable ASAN / LSAN + add_compile_options(-fsanitize=address) + add_link_options(-fsanitize=address -shared-libasan) + else() + # clang-18 complains about `std::aligned_storage` within `std::shared_ptr` compiling against + # libstdc++ + add_compile_options(-Wno-deprecated-declarations) + endif() endif() # Generic abstract C++ utilities @@ -111,7 +152,6 @@ add_subdirectory(packages/third_party/v8 ivm_embedded_v8) add_subdirectory(packages/libivm-v8) # Napi shim -cmake_path(ABSOLUTE_PATH NAPI_INCLUDE_DIR BASE_DIRECTORY ${CMAKE_SOURCE_DIR}) add_subdirectory(packages/third_party/napi) # nodejs require-able module diff --git a/packages/isolated-vm/test/00.datetime.ts b/packages/isolated-vm/test/00.datetime.ts index 626994a..b222076 100644 --- a/packages/isolated-vm/test/00.datetime.ts +++ b/packages/isolated-vm/test/00.datetime.ts @@ -75,13 +75,15 @@ await test("realtime clock", async () => { }); await test("system clock", async () => { + // `std::system_clock` on Windows returns jittering results across different CPU cores. + const threshold = process.platform === "win32" ? 10 : 0; await using agent = await ivm.Agent.create(); const realm = await agent.createRealm(); for (let ii = 0; ii < 5; ++ii) { const then = new Date(); const result = await unsafeEvalAsStringInRealm(agent, realm, () => new Date()); - assert.ok(+result >= +then); - assert.ok(+result <= Date.now()); + assert.ok(+result >= +then - threshold); + assert.ok(+result <= Date.now() + threshold); await setTimeout(1); } }); diff --git a/packages/nodejs/CMakeLists.txt b/packages/nodejs/CMakeLists.txt index 9b1e061..6f00b1a 100644 --- a/packages/nodejs/CMakeLists.txt +++ b/packages/nodejs/CMakeLists.txt @@ -35,9 +35,15 @@ target_link_libraries(ivm_backend_v8 PUBLIC ivm_value ) +# Windows linking +if (WIN32) + target_link_directories(ivm_backend_v8 PUBLIC ${NODE_DIST_DIR}/windows/${IVM_HOST_ARCH}) + target_link_libraries(ivm_backend_v8 PUBLIC node dbghelp winmm) +endif() + # Copy out to ./dist add_custom_command(TARGET ivm_backend_v8 POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy - $ + $ ${CMAKE_SOURCE_DIR}/dist/backend_v8/${IVM_HOST_PLATFORM}-${IVM_HOST_ARCH}/backend_v8.node ) diff --git a/packages/nodejs/agent.cc b/packages/nodejs/agent.cc index 66ce4d0..2d66509 100644 --- a/packages/nodejs/agent.cc +++ b/packages/nodejs/agent.cc @@ -13,7 +13,6 @@ import ivm.utility; import ivm.v8; import ivm.value; import napi; -import v8; namespace ivm { diff --git a/packages/nodejs/value/array.cc b/packages/nodejs/value/array.cc index e78a3ab..92f2051 100644 --- a/packages/nodejs/value/array.cc +++ b/packages/nodejs/value/array.cc @@ -3,7 +3,6 @@ module; module ivm.node; import :array; import napi; -import v8; namespace ivm::napi { diff --git a/packages/third_party/v8/CMakeLists.txt b/packages/third_party/v8/CMakeLists.txt index 230c34b..987a5c4 100644 --- a/packages/third_party/v8/CMakeLists.txt +++ b/packages/third_party/v8/CMakeLists.txt @@ -29,7 +29,9 @@ target_include_directories(${IV8_PREFIX}_v8 SYSTEM PRIVATE ${IV8_INCLUDE_DIR}) # Preprocessor macros which enable dual v8 in the same process if (IVM_IV8_TRICKSHOT) target_compile_definitions(${IV8_PREFIX}_v8 PUBLIC + cppgc=zppgc iv8=iz8 + unibrow=znibrow v8_crdtp=z8_crdtp V8_Dcheck=Z8_Dcheck V8_Fatal=Z8_Fatal @@ -44,11 +46,11 @@ if (IVM_IV8_EMBEDDED) # Link against v8, which is built elsewhere if (V8_LIBRARY_TYPE STREQUAL "static") - target_link_directories(${IV8_PREFIX}_v8 INTERFACE ${V8_OUT_PATH}/obj) - target_link_libraries(${IV8_PREFIX}_v8 INTERFACE v8_monolith) + target_link_directories(${IV8_PREFIX}_v8 PUBLIC ${V8_OUT_PATH}/obj) + target_link_libraries(${IV8_PREFIX}_v8 PUBLIC v8_monolith) else() - target_link_directories(${IV8_PREFIX}_v8 INTERFACE ${V8_OUT_PATH}) - target_link_libraries(${IV8_PREFIX}_v8 INTERFACE v8 v8_libbase v8_libplatform) + target_link_directories(${IV8_PREFIX}_v8 PUBLIC ${V8_OUT_PATH}) + target_link_libraries(${IV8_PREFIX}_v8 PUBLIC v8 v8_libbase v8_libplatform) endif() else() # Prevents deeper v8 headers from being included from nodejs diff --git a/patches/00.trickshot.patch b/patches/00.trickshot.patch index f766889..28ada30 100644 --- a/patches/00.trickshot.patch +++ b/patches/00.trickshot.patch @@ -1,5 +1,5 @@ diff --git a/BUILD.gn b/BUILD.gn -index a7e9c6af6fa..fa15805ad3d 100644 +index a7e9c6af6fa..af099a74d0d 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1291,7 +1291,7 @@ config("toolchain") { @@ -7,7 +7,7 @@ index a7e9c6af6fa..fa15805ad3d 100644 visibility = [ "./*" ] - defines = [] -+ defines = [ "v8=z8", "v8_inspector=z8_inspector", "v8_crdtp=z8_crdtp", "V8_Dcheck=Z8_Dcheck", "V8_Fatal=Z8_Fatal" ] ++ defines = [ "v8=z8", "v8_inspector=z8_inspector", "v8_crdtp=z8_crdtp", "V8_Dcheck=Z8_Dcheck", "V8_Fatal=Z8_Fatal", "cppgc=zppgc", "unibrow=znibrow" ] cflags = [] ldflags = [] @@ -15,7 +15,7 @@ index a7e9c6af6fa..fa15805ad3d 100644 defines = [ "BUILDING_V8_BASE_SHARED" ] } -+ defines += [ "v8=z8", "v8_inspector=z8_inspector", "v8_crdtp=z8_crdtp", "V8_Dcheck=Z8_Dcheck", "V8_Fatal=Z8_Fatal" ] ++ defines += [ "v8=z8", "v8_inspector=z8_inspector", "v8_crdtp=z8_crdtp", "V8_Dcheck=Z8_Dcheck", "V8_Fatal=Z8_Fatal", "cppgc=zppgc", "unibrow=znibrow" ] + if (is_posix || is_fuchsia) { sources += [