import subprocess
import sys
import platform as PLATFORM
+from waflib.Tools import winres
def fetch_git_revision ():
cmd = "git describe HEAD"
conf.check_cxx(cxxflags=["-std=c++11"])
cxx_flags.append('-std=c++11')
if platform == "darwin":
- cxx_flags.append('-stdlib=libc++')
- linker_flags.append('-lc++')
+ cxx_flags.append('--stdlib=libstdc++')
+ # Mavericks and later changed the syntax to be used when including Carbon headers,
+ # from requiring a full path to requiring just the header name.
+ cxx_flags.append('-DCARBON_FLAT_HEADERS')
+ linker_flags.append('--stdlib=libstdc++')
# Prevents visibility issues in standard headers
conf.define("_DARWIN_C_SOURCE", 1)
def configure(conf):
conf.load('compiler_c')
conf.load('compiler_cxx')
+ if Options.options.dist_target == 'mingw':
+ conf.load('winres')
+
conf.env['VERSION'] = VERSION
conf.env['MAJOR'] = MAJOR
conf.env['MINOR'] = MINOR