Fix ld MIN_SDK for simulator targets

ld complains about mixing device and simulator objects in the
tvOS target. Reason is that "tvos_version_min" seems to imply a
device target, whereas simulator must use "tvos_simulator_version_min"
instead.

The stupid part of it is that ld displays a warning in iOS:

ld: warning: URGENT: -ios_version_min is invalid for architecture
x86/x86_64, inferring -ios_simulator_version_min. This will be an error
in the future.

whereas stops abruptly in tvOS:

ld: building for tvOS, but linking in object file built for tvOS
Simulator, file 'obj/a_d2i_fp.o' for architecture x86_64

ld should stop and avoid any poorly explained nonsense.
This commit is contained in:
Davide De Rosa 2018-09-24 12:28:54 +02:00
parent dbba12308a
commit 2262160df5
1 changed files with 5 additions and 1 deletions

View File

@ -62,10 +62,14 @@ if [ $FWTYPE == "dynamic" ]; then
CROSS_SDK="${PLATFORM}${SDKVERSION}.sdk"
SDK="${CROSS_TOP}/SDKs/${CROSS_SDK}"
if [[ $PLATFORM == "AppleTV"* ]]; then
if [[ $PLATFORM == AppleTVSimulator* ]]; then
MIN_SDK="-tvos_simulator_version_min 9.0"
elif [[ $PLATFORM == AppleTV* ]]; then
MIN_SDK="-tvos_version_min 9.0"
elif [[ $PLATFORM == MacOSX* ]]; then
MIN_SDK="-macosx_version_min 10.11"
elif [[ $PLATFORM == iPhoneSimulator* ]]; then
MIN_SDK="-ios_simulator_version_min 8.0"
else
MIN_SDK="-ios_version_min 8.0"
fi