15bdf85f28
We need to figure out where to draw the line when it comes to warning about unknown compiler (Clang), Xcode, or SDK versions, but for now building with Xcode 4.6 should not be an issue. We'll have to revisit this and test with the full set of compiler/Xcode/SDKs we support before the final release. Change-Id: Iac3ec3a25c0f7618b2c3714657d147f17f834d97 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
41 lines
2.1 KiB
Plaintext
41 lines
2.1 KiB
Plaintext
#
|
|
# compiler settings for iOS clang compilers
|
|
#
|
|
# Depends on:
|
|
#
|
|
# QMAKE_IOS_XCODE_VERSION - set in macx-ios-clang/qmake.conf
|
|
#
|
|
|
|
# iOS build flags
|
|
QMAKE_IOS_CFLAGS += -fvisibility=hidden -fpascal-strings -fmessage-length=0
|
|
QMAKE_IOS_CFLAGS += -Wno-trigraphs -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-shorten-64-to-32 -Wno-sign-conversion
|
|
QMAKE_IOS_CXXFLAGS += -fvisibility-inlines-hidden
|
|
QMAKE_IOS_OBJ_CFLAGS += -Wno-arc-abi
|
|
|
|
# Based on the following information, http://clang.llvm.org/doxygen/ObjCRuntime_8h_source.html,
|
|
# we can conclude that it's safe to always pass the following flags
|
|
QMAKE_IOS_OBJ_CFLAGS += -fobjc-nonfragile-abi -fobjc-legacy-dispatch
|
|
|
|
# But these only apply to non-ARM targets
|
|
!contains(QT_ARCH, arm): QMAKE_IOS_CFLAGS += -fexceptions -fasm-blocks
|
|
|
|
# Clang 3.1 (and above) flags
|
|
QMAKE_IOS_CFLAGS += -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wformat -Wno-missing-braces -Wno-unused-function -Wno-unused-label -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-sign-compare -Wpointer-sign -Wno-newline-eof -Wdeprecated-declarations -Winvalid-offsetof -Wno-conversion
|
|
QMAKE_IOS_CXXFLAGS += -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors
|
|
QMAKE_IOS_OBJ_CFLAGS += -Wno-deprecated-implementations -Wprotocol -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector
|
|
|
|
# We do not yet build with C++11 support, so warn about extensions unless they are used all over Qt
|
|
QMAKE_IOS_CXXFLAGS += -Wc++11-extensions -Wc++0x-extensions -Wno-c++11-long-long
|
|
|
|
# Warn about unsupported (later than 4.5) Xcode versions
|
|
!lessThan(QMAKE_IOS_XCODE_VERSION, "4.7"): warning("The version of Xcode installed on this system is not recognised - custom compiler settings may be necessary")
|
|
|
|
# Set build flags
|
|
QMAKE_CFLAGS += $$QMAKE_IOS_CFLAGS
|
|
QMAKE_CXXFLAGS += $$QMAKE_IOS_CFLAGS $$QMAKE_IOS_CXXFLAGS
|
|
QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_IOS_CFLAGS $$QMAKE_IOS_CXXFLAGS $$QMAKE_IOS_OBJ_CFLAGS
|
|
|
|
QMAKE_IOS_CFLAGS =
|
|
QMAKE_IOS_CXXFLAGS =
|
|
QMAKE_IOS_OBJ_CFLAGS =
|