Skip to content

Review Apple architectures (add x64_64 slices for all simulators?) #192

@shirakaba

Description

@shirakaba

Background

Running cmake-rn --apple produces the following files:

build
└── Release
    └── sum.apple.node
        ├── ios-arm64
        ├── ios-arm64-simulator
        ├── macos-arm64_x86_64
        ├── tvos-arm64
        ├── tvos-arm64-simulator
        ├── xros-arm64
        ├── xros-arm64-simulator
        ├── Info.plist
        └── react-native-node-api-module

You can review the architectures like this:

lipo -info build/arm64-apple-ios-sim/out/Release/sum.framework/sum
Non-fat file: build/arm64-apple-ios-sim/out/Release/sum.framework/sum is architecture: arm64

At the code level, the architectures are determined here:

export const APPLE_ARCHITECTURES = {
"x86_64-apple-darwin": "x86_64",
"arm64-apple-darwin": "arm64",
"arm64;x86_64-apple-darwin": "arm64;x86_64",
"arm64-apple-ios": "arm64",
"arm64-apple-ios-sim": "arm64",
"arm64-apple-tvos": "arm64",
// "x86_64-apple-tvos": "x86_64",
"arm64-apple-tvos-sim": "arm64",
"arm64-apple-visionos": "arm64",
"arm64-apple-visionos-sim": "arm64",
} satisfies Record<Target, AppleArchitecture>;

Issue

I noticed that, for all the simulators, we only build arm64. Shouldn't we build the x86_64 slice as well so that Intel Macs can develop for simulator?

Metadata

Metadata

Assignees

Labels

Apple 🍎Anything related to the Apple platform (iOS, macOS, Cocoapods, Xcode, XCFrameworks, etc.)CMake RNOur `cmake` wrapping CLI

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions