diff options
author | Robin Gareus <robin@gareus.org> | 2014-10-25 22:00:47 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-10-25 22:00:47 +0200 |
commit | b23c29c204586dba500e86ff084c8c65263ded9a (patch) | |
tree | 87354765ff7c4e4bf0cb6cb52a53959e898eca63 /wscript | |
parent | baea04713f6a4f96e42bb8f3ed80446cd722f253 (diff) |
fix gcc/C++11
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -156,12 +156,6 @@ def set_compiler_flags (conf,opt): cxx_flags.append('-fno-omit-frame-pointer') linker_flags.append('-fsanitize=address') - if is_clang and platform == "darwin": - # Silence warnings about the non-existing osx clang compiler flags - # -compatibility_version and -current_version. These are Waf - # generated and not needed with clang - cxx_flags.append("-Qunused-arguments") - if opt.gprofile: debug_flags = [ '-pg' ] @@ -217,8 +211,6 @@ def set_compiler_flags (conf,opt): if conf.options.cxx11 or conf.env['build_host'] in [ 'mavericks', 'yosemite' ]: conf.check_cxx(cxxflags=["-std=c++11"]) cxx_flags.append('-std=c++11') - c_flags.append('-Qunused-arguments') - cxx_flags.append('-Qunused-arguments') if platform == "darwin": cxx_flags.append('--stdlib=libstdc++') # Mavericks and later changed the syntax to be used when including Carbon headers, @@ -228,6 +220,13 @@ def set_compiler_flags (conf,opt): # Prevents visibility issues in standard headers conf.define("_DARWIN_C_SOURCE", 1) + if (is_clang and platform == "darwin") or conf.env['build_host'] in ['mavericks', 'yosemite']: + # Silence warnings about the non-existing osx clang compiler flags + # -compatibility_version and -current_version. These are Waf + # generated and not needed with clang + c_flags.append("-Qunused-arguments") + cxx_flags.append("-Qunused-arguments") + if ((re.search ("i[0-9]86", cpu) != None) or (re.search ("x86_64", cpu) != None)) and conf.env['build_target'] != 'none': |