But when switching SDKs to a simulator build, linking fails like this:
cd /Users/martin/code/IosTestApp
export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
export PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Tools:/Library/Frameworks/Python.framework/Versions/3.7/bin:/Users/martin/.cargo/bin:/Users/martin/gem/bin:/opt/local/bin:/opt/local/sbin:/usr/local/texlive/2009/bin/universal-darwin:/Users/martin/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/texbin:/opt/X11/bin:/Applications/Wireshark.app/Contents/MacOS:/usr/local/git/bin
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -fobjc-arc -fobjc-link-runtime -F/Users/martin/Library/Developer/Xcode/DerivedData/IosTestApp-dfkclgwfkpwytnaowvrqhruhakfm/Build/Products/Release-iphonesimulator
clang: error: no input files
Thus, it's missing almost every command line option needed for linking. (It doesn't include the header corresponding to Ld /Users/martin/Library/Developer/Xcode/DerivedData/IosTestApp-dfkclgwfkpwytnaowvrqhruhakfm/Build/Products/Release-iphoneos/IosTestApp.app/IosTestApp normal arm64 either, so this might be an extra stray command that gets run before the actual linking.)
Linking the final executable for iOS device builds works fine:
But when switching SDKs to a simulator build, linking fails like this:
Thus, it's missing almost every command line option needed for linking. (It doesn't include the header corresponding to
Ld /Users/martin/Library/Developer/Xcode/DerivedData/IosTestApp-dfkclgwfkpwytnaowvrqhruhakfm/Build/Products/Release-iphoneos/IosTestApp.app/IosTestApp normal arm64
either, so this might be an extra stray command that gets run before the actual linking.)