-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scripts(ndk-patches/27c): add some Swift-specific excludes and a libc…
…++ header needed for Swift 6
- Loading branch information
1 parent
0f7902c
commit e212650
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- a/usr/include/c++/v1/module.modulemap 2024-11-08 20:03:22 | ||
+++ b/usr/include/c++/v1/module.modulemap 2024-11-08 21:27:52 | ||
@@ -1537,6 +1537,7 @@ | ||
module std_private_memory_uninitialized_algorithms [system] { | ||
header "__memory/uninitialized_algorithms.h" | ||
export std_private_algorithm_copy | ||
+ export std_private_memory_voidify | ||
} | ||
module std_private_memory_unique_ptr [system] { | ||
header "__memory/unique_ptr.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- a/usr/include/c++/v1/stdlib.h 2024-11-08 20:01:18 | ||
+++ b/usr/include/c++/v1/stdlib.h 2024-11-08 20:03:38 | ||
@@ -109,6 +109,7 @@ | ||
# endif | ||
|
||
// MSVCRT already has the correct prototype in <stdlib.h> if __cplusplus is defined | ||
+# if !defined(__swift__) | ||
# if !defined(_LIBCPP_MSVCRT) | ||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI long abs(long __x) _NOEXCEPT { return __builtin_labs(__x); } | ||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI long long abs(long long __x) _NOEXCEPT { | ||
@@ -127,6 +128,7 @@ | ||
_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI long double abs(long double __lcpp_x) _NOEXCEPT { | ||
return __builtin_fabsl(__lcpp_x); | ||
} | ||
+# endif // !defined(__swift__) | ||
|
||
// div | ||
|
||
@@ -141,7 +143,7 @@ | ||
# endif | ||
|
||
// MSVCRT already has the correct prototype in <stdlib.h> if __cplusplus is defined | ||
-# if !defined(_LIBCPP_MSVCRT) | ||
+# if !defined(_LIBCPP_MSVCRT) && !defined(__swift__) | ||
inline _LIBCPP_HIDE_FROM_ABI ldiv_t div(long __x, long __y) _NOEXCEPT { return ::ldiv(__x, __y); } | ||
# if !(defined(__FreeBSD__) && !defined(__LONG_LONG_SUPPORTED)) | ||
inline _LIBCPP_HIDE_FROM_ABI lldiv_t div(long long __x, long long __y) _NOEXCEPT { return ::lldiv(__x, __y); } |