Add some sanity to the clang detection code for qmake build

llvm-config can usually be found in PATH on systems which have standard
paths at all. There is no need to specify LLVM_INSTALL_DIR then.
Furthermore, llvm-config has an option --bindir which will tell us the
directory where clang can be found (if installed). No need to apply
strange heuristics based on LLVM_INSTALL_DIR. Finally, we can check
within each .pro file for the conditions to be met using qmake's
require() function. This way we don't need to fiddle with
LLVM_INSTALL_DIR in unrelated places.

Change-Id: I1a6ab092b06de40dfbfa4a9e7053451360fd24c8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Ulf Hermann
2017-11-16 10:56:28 +01:00
parent b0137c3a01
commit 5e0639542f
10 changed files with 136 additions and 125 deletions

View File

@@ -3,6 +3,8 @@ include(../../shared/clang/clang_installation.pri)
include(../../shared/clang/clang_defines.pri)
requires(!isEmpty(LLVM_VERSION))
SOURCES += \
clangactivationsequencecontextprocessor.cpp \
clangactivationsequenceprocessor.cpp \