~ubuntu-branches/ubuntu/wily/qtbase-opensource-src/wily

« back to all changes in this revision

Viewing changes to mkspecs/common/ios/clang.conf

  • Committer: Package Import Robot
  • Author(s): Timo Jyrinki
  • Date: 2013-02-05 12:46:17 UTC
  • Revision ID: package-import@ubuntu.com-20130205124617-c8jouts182j002fx
Tags: upstream-5.0.1+dfsg
ImportĀ upstreamĀ versionĀ 5.0.1+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# compiler settings for iOS clang compilers
 
3
#
 
4
# Depends on:
 
5
#
 
6
#   QMAKE_IOS_XCODE_VERSION - set in mkspecs/common/ios/versions.conf
 
7
#
 
8
 
 
9
# iOS build flags
 
10
QMAKE_IOS_CFLAGS        = -fvisibility=hidden -fpascal-strings -fmessage-length=0
 
11
QMAKE_IOS_CFLAGS       += -Wno-trigraphs -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-shorten-64-to-32 -Wno-sign-conversion
 
12
QMAKE_IOS_CXXFLAGS      = -fvisibility-inlines-hidden
 
13
QMAKE_IOS_OBJ_CFLAGS    = -Wno-arc-abi -Wc++0x-extensions
 
14
 
 
15
# Device or simulator specific flags
 
16
*simulator* {
 
17
    QMAKE_IOS_CFLAGS   += -fexceptions -fasm-blocks
 
18
    QMAKE_IOS_OBJ_CFLAGS += -fobjc-abi-version=2 -fobjc-legacy-dispatch
 
19
}
 
20
 
 
21
# Compiler version-specific flags
 
22
!lessThan(QMAKE_IOS_XCODE_VERSION, "4.3") {
 
23
    # Clang 3.1 flags (will be used for later versions too)
 
24
    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
 
25
    QMAKE_IOS_CXXFLAGS  += -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wc++11-extensions
 
26
    QMAKE_IOS_OBJ_CFLAGS += -Wno-deprecated-implementations -Wprotocol -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector
 
27
 
 
28
    # Warn about unsupported (later than 4.5) Xcode versions
 
29
    !lessThan(QMAKE_IOS_XCODE_VERSION, "4.6"): warning("The version of Xcode installed on this system is not recognised - custom compiler settings may be necessary")
 
30
} else {
 
31
    if (!lessThan(QMAKE_IOS_XCODE_VERSION, "4.2")) {
 
32
        # Clang 3.0 flags
 
33
        QMAKE_IOS_CFLAGS += -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits
 
34
    } else {
 
35
        # Older Clang versions are not supported
 
36
        error("Unsupported Xcode version $${QMAKE_IOS_XCODE_VERSION}")
 
37
    }
 
38
}
 
39
 
 
40
# Set build flags
 
41
QMAKE_CFLAGS           += $$QMAKE_IOS_CFLAGS
 
42
QMAKE_CXXFLAGS         += $$QMAKE_IOS_CFLAGS $$QMAKE_IOS_CXXFLAGS
 
43
QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_IOS_CFLAGS $$QMAKE_IOS_CXXFLAGS $$QMAKE_IOS_OBJ_CFLAGS
 
44
 
 
45
QMAKE_IOS_CFLAGS =
 
46
QMAKE_IOS_CXXFLAGS =
 
47
QMAKE_IOS_OBJ_CFLAGS =