f9048b3465
Modified common MacOS gcc config for iOS compatibility. Added iOS mkspecs for iOS devices and simulator using G++, LLVM-G++ or CLANG compilers. Change-Id: If0a0b1a3ce4e0dc4db319a315e227a9d31549399 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
48 lines
2.3 KiB
Plaintext
48 lines
2.3 KiB
Plaintext
#
|
|
# compiler settings for iOS clang compilers
|
|
#
|
|
# Depends on:
|
|
#
|
|
# QMAKE_IOS_XCODE_VERSION - set in mkspecs/common/ios/versions.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 -Wc++0x-extensions
|
|
|
|
# Device or simulator specific flags
|
|
*simulator* {
|
|
QMAKE_IOS_CFLAGS += -fexceptions -fasm-blocks
|
|
QMAKE_IOS_OBJ_CFLAGS += -fobjc-abi-version=2 -fobjc-legacy-dispatch
|
|
}
|
|
|
|
# Compiler version-specific flags
|
|
!lessThan(QMAKE_IOS_XCODE_VERSION, "4.3") {
|
|
# Clang 3.1 flags (will be used for later versions too)
|
|
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 -Wc++11-extensions
|
|
QMAKE_IOS_OBJ_CFLAGS += -Wno-deprecated-implementations -Wprotocol -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector
|
|
|
|
# Warn about unsupported (later) Xcode versions
|
|
!lessThan(QMAKE_IOS_XCODE_VERSION, "4.4"): warning("The version of Xcode installed on this system is not recognised - custom compiler settings may be necessary")
|
|
} else {
|
|
if (!lessThan(QMAKE_IOS_XCODE_VERSION, "4.2")) {
|
|
# Clang 3.0 flags
|
|
QMAKE_IOS_CFLAGS += -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits
|
|
} else {
|
|
# Older Clang versions are not supported
|
|
error("Unsupported Xcode version $${QMAKE_IOS_XCODE_VERSION}")
|
|
}
|
|
}
|
|
|
|
# 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 =
|