Skip to content

feat(macos): build arm64-macos and x64-macos V8 slices - #14

Open
edusperoni wants to merge 1 commit into
mainfrom
feat/macos-slices
Open

edusperoni wants to merge 1 commit into
mainfrom
feat/macos-slices

Conversation

@edusperoni

Copy link
Copy Markdown
Collaborator

Supersedes #12, rebuilt on current main so it runs with the R2 artifact cache and sccache, and the CI secrets are available. It keeps only the macOS slices.

What it adds

  • Two variants, arm64-macos and x64-macos, in the Apple job. They use target_os="mac" with no target_environment and keep the full tier set (not lite mode), like Catalyst.
    • They share the rest of the Apple gn args, so pointer compression and the cppgc cage stay off. Every Apple slice is compiled against one include/ with one set of embedder defines (the iOS runtime never defines V8_COMPRESS_POINTERS).
    • chrome_pgo_phase=0 is required: on desktop targets is_official_build otherwise makes gn exec //tools/update_pgo_profiles.py, which a standalone V8 checkout doesn't have.
  • Asset names. The new slices ship as macos-<cpu> (v8-<version>-macos-arm64.tar.gz), the name NativeScript/runtimes already expects from the fork's release.
    • build-ios.sh --print-slice resolves the name. The workflow reads it before the R2 lookup, so a cache hit and a fresh build use the same key.
    • Existing ios-<variant> assets, dist/ dirs and R2 keys don't change.
  • MACOS_DEPLOYMENT_TARGET=13.3, matching CMAKE_OSX_DEPLOYMENT_TARGET for macOS in NativeScript/runtimes.
  • Matrix selection. The config job now chooses the Apple matrix. platforms: macos builds only the two macOS slices, ios builds the seven iOS/Catalyst/tvOS variants, and every other event builds all nine. The job is renamed ios → apple.
  • Tests. tests/apple-args.py covers the macOS gn args, the iOS args that must not leak into macOS (and vice versa), and every variant's slice name.

What's dropped from #12

  • v8_enable_pointer_compression=false on Android. The restriction on external memory comes from the sandbox, which is already pinned off. Node-API gates napi_no_external_buffers_allowed on V8_ENABLE_SANDBOX only.
    • NativeScript/android compiles with -DV8_COMPRESS_POINTERS on 64-bit, so disabling compression would be an ABI mismatch.
    • NativeScript/runtimes currently omits that define on Android against the fork's release. It needs to add the define for arm64-v8a/x86_64 when it moves to these releases.
  • The src-headers closure rewrite. It's unrelated to macOS. The current full-subtree package is a superset of the closure, and both consumers extract it unchanged.
  • The manual release_tag input. As written it could publish a partial release (skipped jobs passed the condition), marked --latest.

Verification

  • python3 tests/apple-args.py: 6 tests pass.
  • A real gn gen for arm64-macos and x64-macos against a V8 14.9 checkout succeeds (602 and 1029 targets).
  • The macOS slices haven't been compiled on this base yet. The fork's run built both successfully on 2026-08-08, before the Catalyst JIT patch landed. That patch only widens existing V8_OS_MACOS paths to Catalyst, so it's inert on native macOS.
  • CI for this PR was cancelled after the config job, pending a full run.

Co-authored with @ammarahm-ed's #12.

Adds two macOS variants to the Apple job. They are target_os="mac" with
no target_environment, keep the full tier set like Catalyst, and share
the rest of the Apple gn args (pointer compression and the cppgc cage
off), since every Apple slice is compiled against the same include/ and
embedder defines. chrome_pgo_phase=0 is required: is_official_build
otherwise makes gn exec a Chromium-only PGO script. The deployment
target, 13.3, follows the macOS runtime in NativeScript/runtimes.

The slices ship as macos-<cpu>. build-ios.sh --print-slice resolves the
dist/ directory and asset stem, and the workflow reads it before the R2
lookup, so a cache hit and a fresh build use the same key. Existing
ios-<variant> names and R2 keys are unchanged.

The config job now chooses the Apple matrix, so a dispatch with
platforms: macos builds only the two macOS slices; every other event
builds all nine Apple variants. tests/apple-args.py covers the macOS
arguments and every variant's slice name.

Supersedes #12, without its Android pointer-compression change, the
src-headers closure rewrite, or the manual release_tag input.

Co-authored-by: Ammar Ahmed <ammarahmed6506@gmail.com>
@coderabbitai

coderabbitai Bot commented Nov 18, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3fff2a29-8271-4a36-b09f-60d6e72dac53

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant