[community triplet] Add arm64-ios-simulator triplet (#37054)

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.
This commit is contained in:
fwcd
2024-03-08 08:19:49 +01:00
committed by GitHub
parent ff29131bc9
commit e8df4d756f

View File

@@ -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)