From e76c9824d1a840fe02f9692c3777f564af39c0d1 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Fri, 14 Aug 2015 22:07:44 -0500 Subject: [PATCH] Specify libc++ as the stdlib on OS X Recommended here: https://cplusplusmusings.wordpress.com/2012/07/05/clang-and-standard-libraries-on-mac-os-x/ --- setup.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 0ded83fa..d2148f67 100644 --- a/setup.py +++ b/setup.py @@ -38,6 +38,8 @@ def get_config_schema(): IncludeDir, LibraryDir, Libraries, \ Switch, StringListOption + default_cxxflags = ['-std=c++0x'] + if 'darwin' in sys.platform: import platform osx_ver, _, _ = platform.mac_ver() @@ -50,7 +52,10 @@ def get_config_schema(): ] default_libs = [] - default_cxxflags = ['-arch', 'i386', '-arch', 'x86_64'] + default_cxxflags = default_cxxflags + [ + '-stdlib=libc++', + '-arch', 'i386', '-arch', 'x86_64' + ] from os.path import isdir for srp in sysroot_paths: @@ -62,7 +67,6 @@ def get_config_schema(): else: default_libs = ["OpenCL"] - default_cxxflags = [] default_ldflags = [] return ConfigSchema([ -- GitLab