feat: build hermes-windows for apple platforms#302
Draft
Saadnajmi wants to merge 3 commits intomicrosoft:mainfrom
Draft
feat: build hermes-windows for apple platforms#302Saadnajmi wants to merge 3 commits intomicrosoft:mainfrom
Saadnajmi wants to merge 3 commits intomicrosoft:mainfrom
Conversation
Member
|
@Saadnajmi , the changes to the build-template look too big. |
Wire macOS into build-ios-framework.sh alongside the existing iOS, tvOS, visionOS, and Catalyst slices so that the universal hermesvm.xcframework includes a macOS slice (x86_64 + arm64). Changes: - build-ios-framework.sh: add macosx to get_architecture, get_deployment_target, build_universal_framework, create_framework - build-apple-framework.sh: fix get_release_version to fall back to CMakeLists.txt when npm/hermes-compiler/package.json is missing (hermes-windows fork); fix build_host_hermesc to explicitly target macOS with correct sysroot and bypass CheckAtomic.cmake - hermes-engine.podspec: point osx vendored_frameworks at the universal xcframework; remove separate build-mac-framework.sh call Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
TypeScript build script (runs natively on Node 22+) that orchestrates Hermes Apple framework builds. Follows the same patterns as build.js: - All action flags default to true, so running with no args performs a full local build (hermesc -> all 8 slices -> xcframework) - CI uses --no-* flags for selective phases (e.g. --no-build --no-build-xcframework to build only hermesc) - Validates outputs after each phase (framework, dSYM, xcframework) - Supports --create-dsym-archive for CI dSYM packaging - Delegates to upstream shell scripts for actual CMake/Xcode work Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add Apple build stage to the 1ES pipeline template and a standalone Apple pipeline for environments without 1ES macOS support. Structure (3 phases, matching the Windows matrix pattern): 1. Build host hermesc compiler (single macOS job) 2. Build platform slices in parallel (8 slices x 2 flavors = 16 jobs) 3. Assemble universal xcframework per flavor (2 jobs) Each job calls build-apple.mts with selective --no-* flags. YAML handles only artifact orchestration, Xcode setup, and pool config. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2d74ede to
7554e86
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Expands the hermes-windows build to also produce macOS (Apple) framework slices. Currently hermes-windows only builds Windows targets (UWP/Win32). This PR adds macOS to the universal
hermesvm.xcframeworkand introduces Apple framework CI jobs to the Azure Pipelines build.This mirrors the changes from facebook/hermes#1970 (upstream
main) and facebook/hermes#1958 (upstreamstatic_h), adapted for hermes-windows.Build script changes
Adds macOS support to the existing
build-ios-framework.shfunctions (get_architecture,get_deployment_target,create_framework,build_universal_framework) so the macOS slice is included in the universal xcframework.build-mac-framework.shis left in place for backward compatibility.Podspec changes
spec.osx.vendored_frameworksnow points touniversal/hermesvm.xcframework(matching iOS, tvOS, visionOS)prepare_commandno longer callsbuild-mac-framework.shseparately — macOS is now built bybuild-ios-framework.shAzure Pipelines CI
Adds Apple framework build jobs to
.ado/build-template.ymlusing the 1ES template with Microsoft-hosted macOS agents (Azure Pipelinespool,macOS-15image):Motivation
The context of this change is microsoft/react-native-macos#2815, where we are adding SPM / prebuild support to React Native macOS.
Including the macOS slice in the universal xcframework allows react-native-macos to use the same prebuilt Hermes artifacts as react-native for iOS, visionOS, and tvOS — without platform-specific patching.
Test plan
build-ios-framework.sh)macos-arm64_x86_64slicebuild-mac-framework.shstill works standalone for local dev🤖 Generated with Claude Code