summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Kundrát <jkt@kde.org>2016-09-13 15:47:37 +0000
committerAlexandru Croitor <alexandru.croitor@qt.io>2016-11-15 13:47:52 +0000
commit21a40af00a85fad03201131426087ec90745b9aa (patch)
tree8895a0e8db3df6bed4a221177aeaa746cb5a7903
parent33e20b479f112979ddb29ccc164af530e3be4f3c (diff)
Pass correct clang prefix directory to GYP
Previously the prefix was hardcoded to "/usr". Now the current environment clang path is considered instead. Change-Id: I23173bb31591dfb6df7a81a37a58502dd6b12886 Task-number: QTBUG-52656 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--src/core/config/desktop_linux.pri5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/config/desktop_linux.pri b/src/core/config/desktop_linux.pri
index a72452b90..e28d7eb7c 100644
--- a/src/core/config/desktop_linux.pri
+++ b/src/core/config/desktop_linux.pri
@@ -9,7 +9,10 @@ GYP_CONFIG += \
clang {
GYP_CONFIG += werror=
- GYP_CONFIG += clang=1 host_clang=1 clang_use_chrome_plugins=0 make_clang_dir=/usr
+ clang_full_path = $$which($${QMAKE_CXX})
+ # Remove the "/bin/clang++" part.
+ clang_prefix = $$section(clang_full_path, /, 0, -3)
+ GYP_CONFIG += clang=1 host_clang=1 clang_use_chrome_plugins=0 make_clang_dir=$${clang_prefix}
linux-clang-libc++: GYP_CONFIG += use_system_libcxx=1
} else {
GYP_CONFIG += clang=0 host_clang=0