Feature(name='has-fobjc-arc', when=lambda cfg: hasCompileFlag(cfg, '-xobjective-c++ -fobjc-arc') and
sys.platform.lower().strip() == 'darwin'), # TODO: this doesn't handle cross-compiling to Apple platforms.
Feature(name='objective-c++', when=lambda cfg: hasCompileFlag(cfg, '-xobjective-c++ -fobjc-arc')),
+ Feature(name='no-noexcept-function-type', when=lambda cfg: featureTestMacros(cfg).get('__cpp_noexcept_function_type', 0) < 201510),
Feature(name='non-lockfree-atomics',
when=lambda cfg: sourceBuilds(cfg, """
//===----------------------------------------------------------------------===//
// Can a noexcept function pointer be caught by a non-noexcept catch clause?
-// UNSUPPORTED: no-exceptions, libcxxabi-no-noexcept-function-type
+// UNSUPPORTED: no-exceptions, no-noexcept-function-type
+
+// Support for catching a function pointer including noexcept was shipped in macOS 10.13
+// XFAIL: use_system_cxx_lib && {{.+}}-apple-macosx10.{{9|10|11|12}}
#include <cassert>
//
//===----------------------------------------------------------------------===//
-// Can a noexcept member function pointer be caught by a non-noexcept catch
-// clause?
-// UNSUPPORTED: no-exceptions, libcxxabi-no-noexcept-function-type
+// Can a noexcept member function pointer be caught by a non-noexcept catch clause?
+// UNSUPPORTED: no-exceptions, no-noexcept-function-type
+
+// Support for catching a function pointer including noexcept was shipped in macOS 10.13
+// XFAIL: use_system_cxx_lib && {{.+}}-apple-macosx10.{{9|10|11|12}}
// GCC 7 and 8 support noexcept function types but this test still fails.
// This is likely a bug in their implementation. Investigation needed.
self.libcxxabi_obj_root = self.get_lit_conf('libcxxabi_obj_root')
super(Configuration, self).configure_obj_root()
- def has_cpp_feature(self, feature, required_value):
- return intMacroValue(self.cxx.dumpMacros().get('__cpp_' + feature, '0')) >= required_value
-
def configure_features(self):
super(Configuration, self).configure_features()
- if not self.has_cpp_feature('noexcept_function_type', 201510):
- self.config.available_features.add('libcxxabi-no-noexcept-function-type')
if not self.get_lit_bool('llvm_unwinder', False):
self.config.available_features.add('libcxxabi-has-system-unwinder')