2011-04-27 10:05:43 +00:00
|
|
|
#
|
2013-07-09 14:07:07 +00:00
|
|
|
# Qmake configuration for Clang on Linux, OS X and iOS
|
2011-04-27 10:05:43 +00:00
|
|
|
#
|
|
|
|
|
2013-03-19 01:57:31 +00:00
|
|
|
QMAKE_COMPILER = gcc clang llvm # clang pretends to be gcc
|
2012-09-13 20:17:33 +00:00
|
|
|
|
2013-03-19 01:57:31 +00:00
|
|
|
QMAKE_CC = clang
|
|
|
|
QMAKE_CXX = clang++
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2014-11-01 20:27:56 +00:00
|
|
|
QMAKE_LINK_C = $$QMAKE_CC
|
|
|
|
QMAKE_LINK_C_SHLIB = $$QMAKE_CC
|
|
|
|
|
2013-03-19 01:57:31 +00:00
|
|
|
QMAKE_LINK = $$QMAKE_CXX
|
|
|
|
QMAKE_LINK_SHLIB = $$QMAKE_CXX
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-03-19 01:57:31 +00:00
|
|
|
CONFIG += clang_pch_style
|
|
|
|
QMAKE_PCH_OUTPUT_EXT = .pch
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2013-12-09 18:56:31 +00:00
|
|
|
QMAKE_CFLAGS_ISYSTEM = -isystem
|
2011-04-27 10:05:43 +00:00
|
|
|
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}
|
2014-06-26 21:56:06 +00:00
|
|
|
QMAKE_CFLAGS_LTCG = -flto
|
2015-02-27 11:44:47 +00:00
|
|
|
QMAKE_CFLAGS_DISABLE_LTCG = -fno-lto
|
2014-06-26 21:56:06 +00:00
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
QMAKE_CXXFLAGS_PRECOMPILE = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
|
|
|
|
QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
|
2014-06-26 21:56:06 +00:00
|
|
|
QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
|
2015-02-27 11:44:47 +00:00
|
|
|
QMAKE_CXXFLAGS_DISABLE_LTCG = $$QMAKE_CFLAGS_DISABLE_LTCG
|
2014-06-26 21:56:06 +00:00
|
|
|
QMAKE_CXXFLAGS_CXX11 = -std=c++11
|
2015-07-08 21:09:10 +00:00
|
|
|
QMAKE_CXXFLAGS_GNUCXX11 = -std=gnu++11
|
2012-05-29 05:10:09 +00:00
|
|
|
|
2013-03-19 01:57:31 +00:00
|
|
|
QMAKE_LFLAGS_CXX11 =
|
2014-06-26 21:56:06 +00:00
|
|
|
QMAKE_LFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
|
2014-11-15 03:27:46 +00:00
|
|
|
|
|
|
|
# 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"
|