Allow to compile on macOS ventura
This commit is contained in:
parent
72846814ba
commit
6904a86576
14
wscript
14
wscript
@ -447,6 +447,8 @@ int main() { return 0; }''',
|
|||||||
conf.env['build_host'] = 'bigsur'
|
conf.env['build_host'] = 'bigsur'
|
||||||
elif re.search ("^21[.]", version) is not None:
|
elif re.search ("^21[.]", version) is not None:
|
||||||
conf.env['build_host'] = 'monterey'
|
conf.env['build_host'] = 'monterey'
|
||||||
|
elif re.search ("^22[.]", version) is not None:
|
||||||
|
conf.env['build_host'] = 'ventura'
|
||||||
else:
|
else:
|
||||||
conf.env['build_host'] = 'irrelevant'
|
conf.env['build_host'] = 'irrelevant'
|
||||||
|
|
||||||
@ -484,6 +486,8 @@ int main() { return 0; }''',
|
|||||||
conf.env['build_target'] = 'bigsur'
|
conf.env['build_target'] = 'bigsur'
|
||||||
elif re.search ("^21[.]", version) is not None:
|
elif re.search ("^21[.]", version) is not None:
|
||||||
conf.env['build_target'] = 'monterey'
|
conf.env['build_target'] = 'monterey'
|
||||||
|
elif re.search ("^21[.]", version) is not None:
|
||||||
|
conf.env['build_target'] = 'ventura'
|
||||||
else:
|
else:
|
||||||
conf.env['build_target'] = 'catalina'
|
conf.env['build_target'] = 'catalina'
|
||||||
else:
|
else:
|
||||||
@ -527,7 +531,7 @@ int main() { return 0; }''',
|
|||||||
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', 'high_sierra', 'mojave', 'catalina' , 'bigsur', 'monterey' ]:
|
if conf.options.cxx11 or conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina' , 'bigsur', 'monterey', 'ventura' ]:
|
||||||
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":
|
||||||
@ -535,7 +539,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 [ 'yosemite', 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina', 'bigsur', 'monterey' ]:
|
if not opt.use_libcpp and not conf.env['build_host'] in [ 'yosemite', 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina', 'bigsur', 'monterey', 'ventura' ]:
|
||||||
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
|
||||||
@ -544,7 +548,7 @@ int main() { return 0; }''',
|
|||||||
cxx_flags.append('-DBOOST_NO_AUTO_PTR')
|
cxx_flags.append('-DBOOST_NO_AUTO_PTR')
|
||||||
cxx_flags.append('-DBOOST_BIND_GLOBAL_PLACEHOLDERS')
|
cxx_flags.append('-DBOOST_BIND_GLOBAL_PLACEHOLDERS')
|
||||||
|
|
||||||
if (is_clang and platform == "darwin") or conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina' , 'bigsur', 'monterey' ]:
|
if (is_clang and platform == "darwin") or conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina' , 'bigsur', 'monterey', 'ventura' ]:
|
||||||
# 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
|
||||||
@ -668,7 +672,7 @@ int main() { return 0; }''',
|
|||||||
"-mmacosx-version-min=10.9"))
|
"-mmacosx-version-min=10.9"))
|
||||||
linker_flags.append("-mmacosx-version-min=10.9")
|
linker_flags.append("-mmacosx-version-min=10.9")
|
||||||
|
|
||||||
elif conf.env['build_target'] in ['bigsur', 'monterey']:
|
elif conf.env['build_target'] in ['bigsur', 'monterey', 'ventura']:
|
||||||
compiler_flags.extend(
|
compiler_flags.extend(
|
||||||
("-DMAC_OS_X_VERSION_MAX_ALLOWED=110000",
|
("-DMAC_OS_X_VERSION_MAX_ALLOWED=110000",
|
||||||
"-mmacosx-version-min=11.0"))
|
"-mmacosx-version-min=11.0"))
|
||||||
@ -1443,7 +1447,7 @@ int main () { __int128 x = 0; return 0; }
|
|||||||
set_compiler_flags (conf, Options.options)
|
set_compiler_flags (conf, Options.options)
|
||||||
|
|
||||||
if sys.platform == 'darwin':
|
if sys.platform == 'darwin':
|
||||||
if conf.env['build_host'] not in [ 'mojave', 'catalina', 'bigsur', 'monterey']:
|
if conf.env['build_host'] not in [ 'mojave', 'catalina', 'bigsur', 'monterey', 'ventura']:
|
||||||
conf.env.append_value('CXXFLAGS_OSX', '-F/System/Library/Frameworks')
|
conf.env.append_value('CXXFLAGS_OSX', '-F/System/Library/Frameworks')
|
||||||
|
|
||||||
conf.env.append_value('CXXFLAGS_OSX', '-F/Library/Frameworks')
|
conf.env.append_value('CXXFLAGS_OSX', '-F/Library/Frameworks')
|
||||||
|
Loading…
Reference in New Issue
Block a user