qt5base-lts/mkspecs/win32-clang-msvc/qmake.conf
Allan Sandfeld Jensen b6cf8cb794 Clang_cl: Use -O3 for full optimization
Pass it through as a traditional clang argument instead of relying on
what MSVC cl.exe can take.

Change-Id: I94405ce6ab80d16b687e62c9aa4b2866ba84f0e2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-04 16:59:29 +00:00

58 lines
1.6 KiB
Plaintext

#
# qmake configuration for win32-clang-msvc
#
# Notice: this uses the clang-cl wrapper
#
include(../common/msvc-desktop.conf)
# clang-cl does not use anything above SSE2 without extra arguments
QMAKE_CFLAGS_SSE3 = -msse3
QMAKE_CFLAGS_SSSE3 = -mssse3
QMAKE_CFLAGS_SSE4_1 = -msse4.1
QMAKE_CFLAGS_SSE4_2 = -msse4.2
QMAKE_CFLAGS_AVX = -mavx
QMAKE_CFLAGS_AVX2 = -mavx2
QMAKE_CFLAGS_F16C = -mf16c
QMAKE_CFLAGS_RDRND = -mrdrnd
QMAKE_CFLAGS_AVX512F = -mavx512f
QMAKE_CFLAGS_AVX512ER = -mavx512er
QMAKE_CFLAGS_AVX512CD = -mavx512cd
QMAKE_CFLAGS_AVX512PF = -mavx512pf
QMAKE_CFLAGS_AVX512DQ = -mavx512dq
QMAKE_CFLAGS_AVX512BW = -mavx512bw
QMAKE_CFLAGS_AVX512VL = -mavx512vl
QMAKE_CFLAGS_AVX512IFMA = -mavx512ifma
QMAKE_CFLAGS_AVX512VBMI = -mavx512vbmi
QMAKE_CFLAGS_AESNI = -maes
QMAKE_CFLAGS_SHANI = -msha
QMAKE_COMPILER += clang_cl llvm
QMAKE_CC = clang-cl
QMAKE_CXX = $$QMAKE_CC
QMAKE_CFLAGS += -Wno-microsoft-enum-value
QMAKE_CXXFLAGS += -Wno-microsoft-enum-value
QMAKE_LINK = lld-link
QMAKE_LIB = llvm-lib /NOLOGO
QMAKE_CFLAGS_LTCG = -flto=thin
QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
QMAKE_CFLAGS_LTCG_FATOBJECTS = -flto
QMAKE_CXXFLAGS_LTCG_FATOBJECTS = $$QMAKE_CFLAGS_LTCG_FATOBJECTS
# Leave QMAKE_LFLAGS_LTCG empty because lld-link doesn't need any additional parameters
QMAKE_LFLAGS_LTCG =
QMAKE_CFLAGS_OPTIMIZE_SIZE = /clang:-Oz
QMAKE_CFLAGS_OPTIMIZE_FULL = /clang:-O3
QMAKE_LFLAGS_RELEASE += /OPT:REF,ICF,LBR
# Precompiled headers are not supported yet by clang
CONFIG -= precompile_header
load(qt_config)