From 64af7a67bb31e7c7af058c52257c609b475775fc Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Fri, 4 Mar 2016 19:23:14 +0100 Subject: [PATCH] clang quirks - Issue 1714 --- waflib/Tools/c_config.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/waflib/Tools/c_config.py b/waflib/Tools/c_config.py index 4cda8b5c..8255c0aa 100644 --- a/waflib/Tools/c_config.py +++ b/waflib/Tools/c_config.py @@ -168,7 +168,12 @@ def parse_flags(self, line, uselib_store, env=None, force_static=False, posix=No elif x.startswith('/LIBPATH:'): prefix = (force_static or static) and 'STLIBPATH_' or 'LIBPATH_' appu(prefix + uselib, [x.replace('/LIBPATH:', '')]) - elif x == '-pthread' or x.startswith('+') or x.startswith('-std'): + elif x.startswith('-std='): + if '++' in x: + app('CXXFLAGS_' + uselib, [x]) + else: + app('CFLAGS_' + uselib, [x]) + elif x == '-pthread' or x.startswith('+'): app('CFLAGS_' + uselib, [x]) app('CXXFLAGS_' + uselib, [x]) app('LINKFLAGS_' + uselib, [x])