mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
libcxx: use compiler's _LIBCPP_HAS_LIBRARY_ALIGNED_ALLOCATION when set
closes #25911
This commit is contained in:
parent
18a131f3da
commit
375d873e1e
1 changed files with 16 additions and 13 deletions
3
lib/libcxx/include/__config
vendored
3
lib/libcxx/include/__config
vendored
|
|
@ -653,6 +653,8 @@ typedef __char32_t char32_t;
|
|||
# define _DECLARE_C99_LDBL_MATH 1
|
||||
# endif
|
||||
|
||||
/* zig patch: compiler defines _LIBCPP_HAS_LIBRARY_ALIGNED_ALLOCATION in some cases */
|
||||
# if !defined(_LIBCPP_HAS_LIBRARY_ALIGNED_ALLOCATION)
|
||||
// If we are getting operator new from the MSVC CRT, then allocation overloads
|
||||
// for align_val_t were added in 19.12, aka VS 2017 version 15.3.
|
||||
# if defined(_LIBCPP_MSVCRT) && defined(_MSC_VER) && _MSC_VER < 1912
|
||||
|
|
@ -672,6 +674,7 @@ typedef __char32_t char32_t;
|
|||
# else
|
||||
# define _LIBCPP_HAS_ALIGNED_ALLOCATION 1
|
||||
# endif
|
||||
# endif
|
||||
|
||||
// It is not yet possible to use aligned_alloc() on all Apple platforms since
|
||||
// 10.15 was the first version to ship an implementation of aligned_alloc().
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue