mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-19 00:56:41 +00:00
[libc++] Provide std::aligned_alloc and std::timespec_get on Apple platforms
rdar://66113878
This commit is contained in:
parent
1bd7c02233
commit
67dfba9629
@ -380,7 +380,17 @@
|
||||
# define _LIBCPP_HAS_QUICK_EXIT
|
||||
# define _LIBCPP_HAS_TIMESPEC_GET
|
||||
# endif
|
||||
# endif // __linux__
|
||||
# elif defined(__APPLE__)
|
||||
// timespec_get and aligned_alloc were introduced in macOS 10.15 and
|
||||
// aligned releases
|
||||
# if (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101500 || \
|
||||
__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130000 || \
|
||||
__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ >= 130000 || \
|
||||
__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ >= 60000)
|
||||
# define _LIBCPP_HAS_ALIGNED_ALLOC
|
||||
# define _LIBCPP_HAS_TIMESPEC_GET
|
||||
# endif
|
||||
# endif // __APPLE__
|
||||
#endif
|
||||
|
||||
#ifndef _LIBCPP_CXX03_LANG
|
||||
|
@ -208,7 +208,17 @@
|
||||
# define TEST_HAS_ALIGNED_ALLOC
|
||||
# define TEST_HAS_TIMESPEC_GET
|
||||
# endif
|
||||
# endif
|
||||
# elif defined(__APPLE__)
|
||||
// timespec_get and aligned_alloc were introduced in macOS 10.15 and
|
||||
// aligned releases
|
||||
# if (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101500 || \
|
||||
__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130000 || \
|
||||
__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ >= 130000 || \
|
||||
__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ >= 60000)
|
||||
# define TEST_HAS_ALIGNED_ALLOC
|
||||
# define TEST_HAS_TIMESPEC_GET
|
||||
# endif
|
||||
# endif // __APPLE__
|
||||
#endif
|
||||
|
||||
/* Features that were introduced in C++14 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user