+
+ if conf.options.cxx11:
+ conf.check_cxx(cxxflags=["-std=c++11"])
+ cxx_flags.append('-std=c++11')
+ if platform == "darwin":
+ cxx_flags.append('-stdlib=libc++')
+ link_flags.append('-lc++')
+ # Prevents visibility issues in standard headers
+ conf.define("_DARWIN_C_SOURCE", 1)
+
+ if conf.options.asan:
+ conf.check_cxx(cxxflags=["-fsanitize=address", "-fno-omit-frame-pointer"], linkflags=["-fsanitize=address"])
+ cxx_flags.append('-fsanitize=address')
+ 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")
+