summaryrefslogtreecommitdiffstats
path: root/src/core/config
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2014-09-24 17:39:45 +0200
committerAndras Becsi <andras.becsi@digia.com>2014-09-26 08:57:33 +0200
commit411e5e9e6d7b68dfae4a93ef90c042d92b7322c1 (patch)
treeedbe448267e72a11182ff590d02d16df0fda526c /src/core/config
parent09e08eaecf475487bff6e83e454e86316fc71106 (diff)
Prevent OS X from picking a wrong version of clang from the env
Until now we relied on the PATH to pick the right clang version on OS X which turned out to be a source of issues on build nodes that have a lot of old cruft lying around which was picked up by gyp. Set make_clang_dir so that gyp uses the configured clang version from Qt and remove the env manipulation from our gyp script. Change-Id: I4ac679ea56fa874eecaa578aad77b462445c0caa Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Diffstat (limited to 'src/core/config')
-rw-r--r--src/core/config/mac_osx.pri15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/config/mac_osx.pri b/src/core/config/mac_osx.pri
index b24d981b2..3f42b6fd7 100644
--- a/src/core/config/mac_osx.pri
+++ b/src/core/config/mac_osx.pri
@@ -1,5 +1,20 @@
+QMAKE_CLANG_DIR = "/usr"
+QMAKE_CLANG_PATH = $$eval(QMAKE_MAC_SDK.macx-clang.$${QMAKE_MAC_SDK}.QMAKE_CXX)
+!isEmpty(QMAKE_CLANG_PATH) {
+ clang_dir = $$clean_path("$$dirname(QMAKE_CLANG_PATH)/../")
+ exists($$clang_dir): QMAKE_CLANG_DIR = $$clang_dir
+}
+
+QMAKE_CLANG_PATH = "$${QMAKE_CLANG_DIR}/bin/clang++"
+message("Using clang++ from $${QMAKE_CLANG_PATH}")
+system("$${QMAKE_CLANG_PATH} --version")
+
GYP_CONFIG += \
qt_os=\"mac\" \
mac_sdk_min=\"10.7\" \
mac_deployment_target=\"$${QMAKE_MACOSX_DEPLOYMENT_TARGET}\" \
+ make_clang_dir=\"$${QMAKE_CLANG_DIR}\" \
clang_use_chrome_plugins=0
+
+QMAKE_MAC_SDK_PATH = "$$eval(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.path)"
+exists($$QMAKE_MAC_SDK_PATH): GYP_CONFIG += mac_sdk_path=\"$${QMAKE_MAC_SDK_PATH}\"