Skip to content

Commit

Permalink
[community triplet] Add arm64-ios-simulator triplet (#37054)
Browse files Browse the repository at this point in the history
This adds an `arm64-ios-simulator` triplet, which is largely identical
to the existing `arm64-ios` triplet, but adds

```cmake
set(VCPKG_OSX_SYSROOT iphonesimulator)
```

Xcode/Clang unfortunately refuses to link `arm64-ios`-built libraries
when linking for the iOS simulator, since it considers the simulator to
be a different platform, thus requiring a new triplet.

> Side note: The motivation for not naming this triplet
`arm64-iphonesimulator` or similar is to be consistent with the naming
of other iOS triplets and to keep build infrastructure that matches on
`ios` triplets intact. There is precedent for this hyphenated naming
scheme, the Rust compiler names the triplet `aarch64-apple-ios-sim`. I
went with the spelled out `simulator` here, since it feels more
descriptive.
  • Loading branch information
fwcd authored Mar 8, 2024
1 parent ff29131 commit e8df4d7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions triplets/community/arm64-ios-simulator.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_CMAKE_SYSTEM_NAME iOS)
set(VCPKG_OSX_SYSROOT iphonesimulator)

0 comments on commit e8df4d7

Please sign in to comment.