13
0

adapted wscript for macos sierra

This commit is contained in:
powerpaul17 2016-12-05 12:57:41 +01:00 committed by Paul Davis
parent e6f94215c4
commit 019ab92a5e

19
wscript
View File

@ -357,6 +357,8 @@ int main() { return 0; }''',
conf.env['build_host'] = 'yosemite' conf.env['build_host'] = 'yosemite'
elif re.search ("^15[.]", version) != None: elif re.search ("^15[.]", version) != None:
conf.env['build_host'] = 'el_capitan' conf.env['build_host'] = 'el_capitan'
elif re.search ("^16[.]", version) != None:
conf.env['build_host'] = 'sierra'
else: else:
conf.env['build_host'] = 'irrelevant' conf.env['build_host'] = 'irrelevant'
@ -380,8 +382,10 @@ int main() { return 0; }''',
conf.env['build_target'] = 'mavericks' conf.env['build_target'] = 'mavericks'
elif re.search ("^14[.]", version) != None: elif re.search ("^14[.]", version) != None:
conf.env['build_target'] = 'yosemite' conf.env['build_target'] = 'yosemite'
else: elif re.search ("^15[.]", version) != None:
conf.env['build_target'] = 'el_capitan' conf.env['build_target'] = 'el_capitan'
else:
conf.env['build_target'] = '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?)",
@ -402,11 +406,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' ]: if opt.use_libcpp or conf.env['build_host'] in [ 'el_capitan', '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' ]: if conf.options.cxx11 or conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', '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":
@ -414,7 +418,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' ]: if not opt.use_libcpp and not conf.env['build_host'] in [ 'el_capitan', '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
@ -423,7 +427,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']: if (is_clang and platform == "darwin") or conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', '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
@ -535,6 +539,11 @@ int main() { return 0; }''',
'-mmacosx-version-min=10.7')) '-mmacosx-version-min=10.7'))
elif conf.env['build_target'] in [ 'mavericks', 'yosemite', 'el_capitan' ]: elif conf.env['build_target'] in [ 'mavericks', 'yosemite', 'el_capitan' ]:
compiler_flags.extend(
("-DMAC_OS_X_VERSION_MAX_ALLOWED=1090",
"-mmacosx-version-min=10.8"))
elif conf.env['build_target'] in [ '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"))