Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Specify libc++ as the stdlib on OS X
  • Loading branch information
inducer committed Aug 15, 2015
1 parent 1d11993 commit e76c982
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions setup.py
Expand Up @@ -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()
Expand All @@ -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:
Expand All @@ -62,7 +67,6 @@ def get_config_schema():

else:
default_libs = ["OpenCL"]
default_cxxflags = []
default_ldflags = []

return ConfigSchema([
Expand Down

0 comments on commit e76c982

Please sign in to comment.