Adds support for building in Mac OS High Sierra
This commit is contained in:
parent
c9042b095c
commit
e3c6a41c11
18
wscript
18
wscript
@ -135,7 +135,7 @@ clang_dict['sse'] = ''
|
|||||||
clang_dict['fpmath-sse'] = ''
|
clang_dict['fpmath-sse'] = ''
|
||||||
clang_dict['xmmintrinsics'] = ''
|
clang_dict['xmmintrinsics'] = ''
|
||||||
clang_dict['silence-unused-arguments'] = '-Qunused-arguments'
|
clang_dict['silence-unused-arguments'] = '-Qunused-arguments'
|
||||||
clang_dict['extra-cxx-warnings'] = [ '-Woverloaded-virtual', '-Wno-mismatched-tags', '-Wno-cast-align', '-Wno-unused-local-typedefs' ]
|
clang_dict['extra-cxx-warnings'] = [ '-Woverloaded-virtual', '-Wno-mismatched-tags', '-Wno-cast-align', '-Wno-unused-local-typedefs', '-Wunneeded-internal-declaration' ]
|
||||||
clang_dict['cxx-strict'] = [ '-ansi', '-Wnon-virtual-dtor', '-Woverloaded-virtual', '-fstrict-overflow' ]
|
clang_dict['cxx-strict'] = [ '-ansi', '-Wnon-virtual-dtor', '-Woverloaded-virtual', '-fstrict-overflow' ]
|
||||||
clang_dict['strict'] = ['-Wall', '-Wcast-align', '-Wextra', '-Wwrite-strings' ]
|
clang_dict['strict'] = ['-Wall', '-Wcast-align', '-Wextra', '-Wwrite-strings' ]
|
||||||
clang_dict['generic-x86'] = [ '-arch', 'i386' ]
|
clang_dict['generic-x86'] = [ '-arch', 'i386' ]
|
||||||
@ -385,6 +385,8 @@ int main() { return 0; }''',
|
|||||||
conf.env['build_host'] = 'el_capitan'
|
conf.env['build_host'] = 'el_capitan'
|
||||||
elif re.search ("^16[.]", version) != None:
|
elif re.search ("^16[.]", version) != None:
|
||||||
conf.env['build_host'] = 'sierra'
|
conf.env['build_host'] = 'sierra'
|
||||||
|
elif re.search ("^17[.]", version) != None:
|
||||||
|
conf.env['build_host'] = 'high_sierra'
|
||||||
else:
|
else:
|
||||||
conf.env['build_host'] = 'irrelevant'
|
conf.env['build_host'] = 'irrelevant'
|
||||||
|
|
||||||
@ -410,8 +412,10 @@ int main() { return 0; }''',
|
|||||||
conf.env['build_target'] = 'yosemite'
|
conf.env['build_target'] = 'yosemite'
|
||||||
elif re.search ("^15[.]", version) != None:
|
elif re.search ("^15[.]", version) != None:
|
||||||
conf.env['build_target'] = 'el_capitan'
|
conf.env['build_target'] = 'el_capitan'
|
||||||
else:
|
elif re.search ("^16[.]", version) != None:
|
||||||
conf.env['build_target'] = 'sierra'
|
conf.env['build_target'] = 'sierra'
|
||||||
|
else:
|
||||||
|
conf.env['build_target'] = 'high_sierra'
|
||||||
else:
|
else:
|
||||||
match = re.search(
|
match = re.search(
|
||||||
"(?P<cpu>i[0-6]86|x86_64|powerpc|ppc|ppc64|arm|s390x?)",
|
"(?P<cpu>i[0-6]86|x86_64|powerpc|ppc|ppc64|arm|s390x?)",
|
||||||
@ -432,11 +436,11 @@ int main() { return 0; }''',
|
|||||||
#
|
#
|
||||||
compiler_flags.append ('-U__STRICT_ANSI__')
|
compiler_flags.append ('-U__STRICT_ANSI__')
|
||||||
|
|
||||||
if opt.use_libcpp or conf.env['build_host'] in [ 'el_capitan', 'sierra' ]:
|
if opt.use_libcpp or conf.env['build_host'] in [ 'el_capitan', 'sierra', 'high_sierra' ]:
|
||||||
cxx_flags.append('--stdlib=libc++')
|
cxx_flags.append('--stdlib=libc++')
|
||||||
linker_flags.append('--stdlib=libc++')
|
linker_flags.append('--stdlib=libc++')
|
||||||
|
|
||||||
if conf.options.cxx11 or conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', 'sierra' ]:
|
if conf.options.cxx11 or conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', 'sierra', 'high_sierra' ]:
|
||||||
conf.check_cxx(cxxflags=["-std=c++11"])
|
conf.check_cxx(cxxflags=["-std=c++11"])
|
||||||
cxx_flags.append('-std=c++11')
|
cxx_flags.append('-std=c++11')
|
||||||
if platform == "darwin":
|
if platform == "darwin":
|
||||||
@ -444,7 +448,7 @@ int main() { return 0; }''',
|
|||||||
# from requiring a full path to requiring just the header name.
|
# from requiring a full path to requiring just the header name.
|
||||||
cxx_flags.append('-DCARBON_FLAT_HEADERS')
|
cxx_flags.append('-DCARBON_FLAT_HEADERS')
|
||||||
|
|
||||||
if not opt.use_libcpp and not conf.env['build_host'] in [ 'el_capitan', 'sierra' ]:
|
if not opt.use_libcpp and not conf.env['build_host'] in [ 'el_capitan', 'sierra', 'high_sierra' ]:
|
||||||
cxx_flags.append('--stdlib=libstdc++')
|
cxx_flags.append('--stdlib=libstdc++')
|
||||||
linker_flags.append('--stdlib=libstdc++')
|
linker_flags.append('--stdlib=libstdc++')
|
||||||
# Prevents visibility issues in standard headers
|
# Prevents visibility issues in standard headers
|
||||||
@ -453,7 +457,7 @@ int main() { return 0; }''',
|
|||||||
cxx_flags.append('-DBOOST_NO_AUTO_PTR')
|
cxx_flags.append('-DBOOST_NO_AUTO_PTR')
|
||||||
|
|
||||||
|
|
||||||
if (is_clang and platform == "darwin") or conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', 'sierra' ]:
|
if (is_clang and platform == "darwin") or conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', 'sierra', 'high_sierra' ]:
|
||||||
# Silence warnings about the non-existing osx clang compiler flags
|
# Silence warnings about the non-existing osx clang compiler flags
|
||||||
# -compatibility_version and -current_version. These are Waf
|
# -compatibility_version and -current_version. These are Waf
|
||||||
# generated and not needed with clang
|
# generated and not needed with clang
|
||||||
@ -569,7 +573,7 @@ int main() { return 0; }''',
|
|||||||
("-DMAC_OS_X_VERSION_MAX_ALLOWED=1090",
|
("-DMAC_OS_X_VERSION_MAX_ALLOWED=1090",
|
||||||
"-mmacosx-version-min=10.8"))
|
"-mmacosx-version-min=10.8"))
|
||||||
|
|
||||||
elif conf.env['build_target'] in ['el_capitan', 'sierra' ]:
|
elif conf.env['build_target'] in ['el_capitan', 'sierra', 'high_sierra' ]:
|
||||||
compiler_flags.extend(
|
compiler_flags.extend(
|
||||||
("-DMAC_OS_X_VERSION_MAX_ALLOWED=1090",
|
("-DMAC_OS_X_VERSION_MAX_ALLOWED=1090",
|
||||||
"-mmacosx-version-min=10.9"))
|
"-mmacosx-version-min=10.9"))
|
||||||
|
Loading…
Reference in New Issue
Block a user