ff44440651
Prefer -std=gnu++11 unless strict_c++11 is defined. You can enable strict C++11/C++14 mode by using CONFIG += strict_c++ That is enabled for Qt's own code, so we we don't accidentally use GNU extensions in portable code. There's no support for strict C++98 mode (that is, the -ansi option). [ChangeLog][qmake] By default, GNU extensions are now enabled with Clang, GCC and ICC even in C++11 and C++14 modes. To disable the GNU extensions, add to your .pro file: CONFIG += strict_c++. Change-Id: Ib056b47dde3341ef9a52ffff13ef14de2169bef5 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
39 lines
1.4 KiB
Plaintext
39 lines
1.4 KiB
Plaintext
#
|
|
# Qmake configuration for Clang on Linux, OS X and iOS
|
|
#
|
|
|
|
QMAKE_COMPILER = gcc clang llvm # clang pretends to be gcc
|
|
|
|
QMAKE_CC = clang
|
|
QMAKE_CXX = clang++
|
|
|
|
QMAKE_LINK_C = $$QMAKE_CC
|
|
QMAKE_LINK_C_SHLIB = $$QMAKE_CC
|
|
|
|
QMAKE_LINK = $$QMAKE_CXX
|
|
QMAKE_LINK_SHLIB = $$QMAKE_CXX
|
|
|
|
CONFIG += clang_pch_style
|
|
QMAKE_PCH_OUTPUT_EXT = .pch
|
|
|
|
QMAKE_CFLAGS_ISYSTEM = -isystem
|
|
QMAKE_CFLAGS_PRECOMPILE = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
|
|
QMAKE_CFLAGS_USE_PRECOMPILE = -Xclang -include-pch -Xclang ${QMAKE_PCH_OUTPUT}
|
|
QMAKE_CFLAGS_LTCG = -flto
|
|
QMAKE_CFLAGS_DISABLE_LTCG = -fno-lto
|
|
|
|
QMAKE_CXXFLAGS_PRECOMPILE = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
|
|
QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
|
|
QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
|
|
QMAKE_CXXFLAGS_DISABLE_LTCG = $$QMAKE_CFLAGS_DISABLE_LTCG
|
|
QMAKE_CXXFLAGS_CXX11 = -std=c++11
|
|
QMAKE_CXXFLAGS_GNUCXX11 = -std=gnu++11
|
|
|
|
QMAKE_LFLAGS_CXX11 =
|
|
QMAKE_LFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
|
|
|
|
# Wrapper tools that understand .o/.a files with LLVM bytecode instead of machine code
|
|
QMAKE_AR_LTCG = llvm-ar cqs
|
|
QMAKE_NM_LTCG = gcc-nm -P
|
|
QMAKE_RANLIB_LTCG = true # No need to run, since llvm-ar has "s"
|