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
|
|
|
|
2018-06-14 12:54:37 +00:00
|
|
|
QMAKE_CC = $${CROSS_COMPILE}clang
|
|
|
|
QMAKE_CXX = $${CROSS_COMPILE}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
|
2018-02-14 12:40:57 +00:00
|
|
|
QMAKE_CFLAGS_GNUC99 = -std=gnu99
|
|
|
|
QMAKE_CFLAGS_GNUC11 = -std=gnu11
|
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-09 00:21:30 +00:00
|
|
|
QMAKE_CXXFLAGS_CXX14 = -std=c++1y
|
|
|
|
QMAKE_CXXFLAGS_CXX1Z = -std=c++1z
|
2019-04-17 14:01:46 +00:00
|
|
|
QMAKE_CXXFLAGS_CXX2A = -std=c++2a
|
2015-07-08 21:09:10 +00:00
|
|
|
QMAKE_CXXFLAGS_GNUCXX11 = -std=gnu++11
|
2015-07-09 00:21:30 +00:00
|
|
|
QMAKE_CXXFLAGS_GNUCXX14 = -std=gnu++1y
|
|
|
|
QMAKE_CXXFLAGS_GNUCXX1Z = -std=gnu++1z
|
2019-04-17 14:01:46 +00:00
|
|
|
QMAKE_CXXFLAGS_GNUCXX2A = -std=gnu++2a
|
2012-05-29 05:10:09 +00:00
|
|
|
|
2013-03-19 01:57:31 +00:00
|
|
|
QMAKE_LFLAGS_CXX11 =
|
2015-07-09 00:21:30 +00:00
|
|
|
QMAKE_LFLAGS_CXX14 =
|
|
|
|
QMAKE_LFLAGS_CXX1Z =
|
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
|
2016-05-30 13:30:35 +00:00
|
|
|
QMAKE_NM_LTCG = llvm-nm -P
|
2014-11-15 03:27:46 +00:00
|
|
|
QMAKE_RANLIB_LTCG = true # No need to run, since llvm-ar has "s"
|
2018-08-29 20:18:42 +00:00
|
|
|
|
|
|
|
QMAKE_CFLAGS_COVERAGE_TRACE_PC_GUARD = -fsanitize-coverage=trace-pc-guard
|
|
|
|
QMAKE_CXXFLAGS_COVERAGE_TRACE_PC_GUARD = -fsanitize-coverage=trace-pc-guard
|
|
|
|
QMAKE_LFLAGS_COVERAGE_TRACE_PC_GUARD = -fsanitize-coverage=trace-pc-guard
|