build: Disable precompiled headers on OS X with clang < 6.1.0
Change-Id: Ie36ea54d4229239f3bbd87998dc2e2a45dad6a2b
Refs: #2804
diff --git a/.waf-tools/pch.py b/.waf-tools/pch.py
index 08cc5de..3df299f 100644
--- a/.waf-tools/pch.py
+++ b/.waf-tools/pch.py
@@ -67,6 +67,11 @@
def configure(conf):
if (conf.options.with_pch and conf.env['COMPILER_CXX'] in PCH_COMPILER_OPTIONS.keys()):
+ if Utils.unversioned_sys_platform() == "darwin" and conf.env['CXX_NAME'] == 'clang':
+ version = tuple(int(i) for i in conf.env['CC_VERSION'])
+ if version < (6, 1, 0):
+ # Issue #2804
+ return
conf.env.WITH_PCH = True
flags = PCH_COMPILER_OPTIONS[conf.env['COMPILER_CXX']]
conf.env.CXXPCH_F = flags[0]