[libc++] Update availability markup for Filesystem on Apple platforms
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@365068 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/__config b/include/__config
index 5eb69b4..51ac16c 100644
--- a/include/__config
+++ b/include/__config
@@ -1294,15 +1294,15 @@
__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/utils/libcxx/test/config.py b/utils/libcxx/test/config.py
index c618c29..e263e9d 100644
--- a/utils/libcxx/test/config.py
+++ b/utils/libcxx/test/config.py
@@ -1164,10 +1164,10 @@
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 <filesystem>")
+ self.lit_config.note("the deployment target does not support <filesystem>")
else:
self.cxx.flags += ['-D_LIBCPP_DISABLE_AVAILABILITY']