summaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--src/core/config/mac_osx.pri15
-rwxr-xr-xtools/buildscripts/gyp_qtwebengine7
2 files changed, 15 insertions, 7 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}\"
diff --git a/tools/buildscripts/gyp_qtwebengine b/tools/buildscripts/gyp_qtwebengine
index eb44477e7..6f2bbc936 100755
--- a/tools/buildscripts/gyp_qtwebengine
+++ b/tools/buildscripts/gyp_qtwebengine
@@ -9,7 +9,6 @@ print 'using python: ' + sys.executable + ' version: ' + sys.version
if sys.platform == "darwin":
print 'xcode version: ' + subprocess.check_output(['xcodebuild', '-version']).replace('\n', ' ')
- print 'clang++ version: ' + subprocess.check_output(['clang++', '--version']).replace('\n', ' ')
qtwebengine_root = os.path.normcase(os.path.abspath(os.path.join(os.path.dirname(__file__), '../..')))
import qtwebengine_utils as utils
@@ -87,12 +86,6 @@ if __name__ == '__main__':
if 'qt_cross_compile=1' in sys.argv:
os.environ['GYP_CROSSCOMPILE'] = '1'
- # On Mac we want to override CXX and CC that is provided with
- # the Chromium GYP environment.
- if sys.platform.startswith('darwin') and not 'GYP_CROSSCOMPILE' in os.environ:
- os.environ['CXX'] = 'clang++'
- os.environ['CC'] = 'clang'
-
gyp_helper.apply_chromium_gyp_env()
# This could give false positives since it doesn't actually do real option