qt5base-lts/mkspecs/features/uikit/bitcode.prf
Jake Petroules 840aa67146 Fix Bitcode handling for both makefile and Xcode generators
This fixes an issue which caused certain iOS projects to fail to link
when building with Xcode, and also fixes an issue where projects were
only ever built with -fembed-bitcode instead of -fembed-bitcode-marker
for debug builds with the makefile generator.

Task-number: QTBUG-58754
Change-Id: Icf0c9f0d64dbc0b38d6c48bf635c5383a78bd6d5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-03-03 20:25:52 +00:00

22 lines
1.0 KiB
Plaintext

lessThan(QMAKE_XCODE_VERSION, "7.0") {
warning("You need to update Xcode to version 7 or newer to support bitcode")
} else: !macx-xcode {
# Simulator builds and all debug builds SHOULD use -fembed-bitcode-marker,
# but unfortunately the -fembed-bitcode and -fembed-bitcode-marker driver
# flags do not work in conjunction with -Xarch, so we'll have to let it use
# the "wrong" flags for now (note that this issue affects only the Makefile
# generator). We also don't want the flags to be passed in Xcode builds, as
# the Xcode ENABLE_BITCODE setting will take care of that for us.
release {
QMAKE_CFLAGS += -fembed-bitcode
QMAKE_CXXFLAGS += -fembed-bitcode
QMAKE_OBJECTIVE_CFLAGS += -fembed-bitcode
QMAKE_LFLAGS += -fembed-bitcode
} else {
QMAKE_CFLAGS += -fembed-bitcode-marker
QMAKE_CXXFLAGS += -fembed-bitcode-marker
QMAKE_OBJECTIVE_CFLAGS += -fembed-bitcode-marker
QMAKE_LFLAGS += -fembed-bitcode-marker
}
}