From 09e9d7781b2b984caf3b7d85a755028031e81425 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 17 Sep 2024 00:01:51 +0200 Subject: [PATCH] Add build support for macOS/Sonoma At some point in the not-too-distant-future we need to simplify this and simply require Mojave/XCode 10 or later. --- wscript | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/wscript b/wscript index 79bf4cb9cc..36972a75c1 100644 --- a/wscript +++ b/wscript @@ -471,6 +471,8 @@ int main() { return 0; }''', conf.env['build_host'] = 'ventura' elif re.search ("^23[.]", version) is not None: conf.env['build_host'] = 'sonoma' + elif re.search ("^24[.]", version) is not None: + conf.env['build_host'] = 'sequoia' else: conf.env['build_host'] = 'irrelevant' @@ -512,6 +514,8 @@ int main() { return 0; }''', conf.env['build_target'] = 'ventura' elif re.search ("^23[.]", version) is not None: conf.env['build_target'] = 'sonoma' + elif re.search ("^24[.]", version) is not None: + conf.env['build_target'] = 'sequoia' else: conf.env['build_target'] = 'catalina' else: @@ -572,20 +576,20 @@ int main() { return 0; }''', elif conf.options.cxx11: conf.check_cxx(cxxflags=["-std=c++11"]) cxx_flags.append('-std=c++11') - elif conf.env['build_host'] in [ 'bigsur', 'monterey', 'ventura', 'sonoma' ]: + elif conf.env['build_host'] in [ 'bigsur', 'monterey', 'ventura', 'sonoma', 'sequoia' ]: conf.check_cxx(cxxflags=["-std=c++17"]) cxx_flags.append('-std=c++17') elif conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina' ]: conf.check_cxx(cxxflags=["-std=c++11"]) cxx_flags.append('-std=c++11') - if conf.options.cxx11 or conf.options.cxx17 or conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina' , 'bigsur', 'monterey', 'ventura', 'sonoma' ]: + if conf.options.cxx11 or conf.options.cxx17 or conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina' , 'bigsur', 'monterey', 'ventura', 'sonoma', 'sequoia' ]: if platform == "darwin": # 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') - if not opt.use_libcpp and not conf.env['build_host'] in [ 'yosemite', 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina', 'bigsur', 'monterey', 'ventura', 'sonoma' ]: + if not opt.use_libcpp and not conf.env['build_host'] in [ 'yosemite', 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina', 'bigsur', 'monterey', 'ventura', 'sonoma', 'sequoia' ]: cxx_flags.append('--stdlib=libstdc++') linker_flags.append('--stdlib=libstdc++') # Prevents visibility issues in standard headers @@ -597,7 +601,7 @@ int main() { return 0; }''', cxx_flags.append('-DBOOST_NO_AUTO_PTR') 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', 'ventura', 'sonoma' ]: + if (is_clang and platform == "darwin") or conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina' , 'bigsur', 'monterey', 'ventura', 'sonoma', 'sequoia' ]: # Silence warnings about the non-existing osx clang compiler flags # -compatibility_version and -current_version. These are Waf # generated and not needed with clang @@ -727,7 +731,7 @@ int main() { return 0; }''', "-mmacosx-version-min=10.11")) linker_flags.append("-mmacosx-version-min=10.11") - elif conf.env['build_target'] in ['bigsur', 'monterey', 'ventura', 'sonoma']: + elif conf.env['build_target'] in ['bigsur', 'monterey', 'ventura', 'sonoma', 'sequoia']: compiler_flags.extend( ("-DMAC_OS_X_VERSION_MAX_ALLOWED=110000", "-mmacosx-version-min=11.0")) @@ -1509,7 +1513,7 @@ int main () { __int128 x = 0; return 0; } set_compiler_flags (conf, Options.options) if sys.platform == 'darwin': - if conf.env['build_host'] not in [ 'mojave', 'catalina', 'bigsur', 'monterey', 'ventura', 'sonoma']: + if conf.env['build_host'] not in [ 'mojave', 'catalina', 'bigsur', 'monterey', 'ventura', 'sonoma', 'sequoia']: conf.env.append_value('CXXFLAGS_OSX', '-F/System/Library/Frameworks') conf.env.append_value('CXXFLAGS_OSX', '-F/Library/Frameworks')