diff --git a/libcxx/include/__config b/libcxx/include/__config index 5eb69b4e93a0..51ac16cc5722 100644 --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -1294,15 +1294,15 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container( __attribute__((availability(macosx,strict,introduced=10.9))) \ __attribute__((availability(ios,strict,introduced=7.0))) # define _LIBCPP_AVAILABILITY_FILESYSTEM \ - __attribute__((availability(macosx,strict,unavailable))) \ - __attribute__((availability(ios,strict,unavailable))) \ - __attribute__((availability(tvos,strict,unavailable))) \ - __attribute__((availability(watchos,strict,unavailable))) + __attribute__((availability(macosx,strict,introduced=10.15))) \ + __attribute__((availability(ios,strict,introduced=13.0))) \ + __attribute__((availability(tvos,strict,introduced=13.0))) \ + __attribute__((availability(watchos,strict,introduced=6.0))) # define _LIBCPP_AVAILABILITY_FILESYSTEM_PUSH \ - _Pragma("clang attribute push(__attribute__((availability(macosx,strict,unavailable))), apply_to=any(function,record))") \ - _Pragma("clang attribute push(__attribute__((availability(ios,strict,unavailable))), apply_to=any(function,record))") \ - _Pragma("clang attribute push(__attribute__((availability(tvos,strict,unavailable))), apply_to=any(function,record))") \ - _Pragma("clang attribute push(__attribute__((availability(watchos,strict,unavailable))), apply_to=any(function,record))") + _Pragma("clang attribute push(__attribute__((availability(macosx,strict,introduced=10.15))), apply_to=any(function,record))") \ + _Pragma("clang attribute push(__attribute__((availability(ios,strict,introduced=13.0))), apply_to=any(function,record))") \ + _Pragma("clang attribute push(__attribute__((availability(tvos,strict,introduced=13.0))), apply_to=any(function,record))") \ + _Pragma("clang attribute push(__attribute__((availability(watchos,strict,introduced=6.0))), apply_to=any(function,record))") # define _LIBCPP_AVAILABILITY_FILESYSTEM_POP \ _Pragma("clang attribute pop") \ _Pragma("clang attribute pop") \ diff --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py index c618c29fd15c..e263e9db7502 100644 --- a/libcxx/utils/libcxx/test/config.py +++ b/libcxx/utils/libcxx/test/config.py @@ -1164,10 +1164,10 @@ class Configuration(object): self.config.available_features.add('dylib-has-no-bad_any_cast') self.lit_config.note("throwing bad_any_cast is not supported by the deployment target") - # Filesystem is not supported on Apple platforms yet - if name == 'macosx': + # Filesystem is support on Apple platforms starting with macosx10.15. + if name == 'macosx' and version in ('10.%s' % v for v in range(7, 15)): self.config.available_features.add('dylib-has-no-filesystem') - self.lit_config.note("the deployment target does not support the dylib parts of ") + self.lit_config.note("the deployment target does not support ") else: self.cxx.flags += ['-D_LIBCPP_DISABLE_AVAILABILITY']