Describe the bug
When using SIMULATOR64 or SIMULATORARM64 for the PLATFORM, the target triplet is missing the -simulator suffix. It is set to x86_64-apple-ios${DEPLOYMENT_TARGET} instead of x86_64-apple-ios${DEPLOYMENT_TARGET}-simulator
To Reproduce
Steps to reproduce the behavior:
Build libTIFF with -DCMAKE_TOOLCHAIN_FILE=ios.toolchain.cmake -DPLATFORM=SIMULATORARM64 -DDEPLOYMENT_TARGET=8.0
Build fails with the following error:
[ 44%] Linking C executable raw2tiff
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --target=arm64-apple-ios8.0 -fembed-bitcode -fobjc-abi-version=2 -fobjc-arc -Wall -Winline -Wformat-security -Wpointer-arith -Wdisabled-optimization -Wno-unknown-pragmas -fstrict-aliasing -O3 -DNDEBUG -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.0.sdk -mios-simulator-version-min=8.0 -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/raw2tiff.dir/raw2tiff.c.o -o raw2tiff ../libtiff/libtiff.a /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.0.sdk/usr/lib/libz.tbd
ld: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.0.sdk/usr/lib/libz.tbd) built for iOS Simulator, file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.0.sdk/usr/lib/libz.tbd' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Expected behavior
The build should succeed (and it does when appending -simulator to the target triple)
Describe the bug When using
SIMULATOR64
orSIMULATORARM64
for thePLATFORM
, the target triplet is missing the-simulator
suffix. It is set tox86_64-apple-ios${DEPLOYMENT_TARGET}
instead ofx86_64-apple-ios${DEPLOYMENT_TARGET}-simulator
To Reproduce Steps to reproduce the behavior:
-DCMAKE_TOOLCHAIN_FILE=ios.toolchain.cmake -DPLATFORM=SIMULATORARM64 -DDEPLOYMENT_TARGET=8.0
Expected behavior The build should succeed (and it does when appending
-simulator
to the target triple)Environment