Skip to content

Commit 2ba9032

Browse files
compnerdhyp
authored andcommitted
ClangImporter: add support for Android API Notes
Introduce the first APINotes injection for the Android platform. This follows the VCRuntime pattern of permitting the SDK to provide API Notes that augment the system SDK. This adds a workaround for incorrect nullability on the `fts_open` function in bionic. The system library itself is fixed at: https://android-review.googlesource.com/c/platform/bionic/+/3151616 (cherry-picked from 47f9d78)
1 parent bd1a24c commit 2ba9032

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

stdlib/public/Platform/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,11 @@ if("ANDROID" IN_LIST SWIFT_SDKS)
472472
COMPONENT sdk-overlay)
473473
endif()
474474
endforeach()
475+
476+
swift_install_in_component(FILES
477+
posix_filesystem.apinotes
478+
DESTINATION "share"
479+
COMPONENT sdk-overlay)
475480
endif()
476481
add_custom_target(android_modulemap DEPENDS ${android_modulemap_target_list})
477482
set_property(TARGET android_modulemap PROPERTY FOLDER "Miscellaneous")
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
Name: bionic
3+
Functions:
4+
- Name: fts_open
5+
Parameters:
6+
- Position: 0
7+
Type: "char * const _Nullable * _Nonnull"

0 commit comments

Comments
 (0)