Skip to content

Commit 7fa3a41

Browse files
committed
[android] add a module map for Android NDK
This commit doesn't install them yet, they will be installed and a whole Android NDK module will be built in a follow-up commit This module map covers the Bionic C standard library and other Posix headers used in the Android NDK
1 parent 7177d90 commit 7fa3a41

File tree

3 files changed

+865
-0
lines changed

3 files changed

+865
-0
lines changed
+150
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
//===--- SwiftAndroidNDK.h ------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2014 - 2024 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See https://swift.org/LICENSE.txt for license information
9+
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
13+
#ifndef SWIFT_ANDROID_NDK_MODULE
14+
#define SWIFT_ANDROID_NDK_MODULE
15+
16+
#include <complex.h>
17+
#include <ctype.h>
18+
#include <errno.h>
19+
#include <fenv.h>
20+
#include <inttypes.h>
21+
#include <limits.h>
22+
#include <locale.h>
23+
#include <malloc.h>
24+
#include <math.h>
25+
#include <setjmp.h>
26+
#include <signal.h>
27+
#include <stdatomic.h>
28+
#include <stdint.h>
29+
#include <stdio.h>
30+
#include <stdio_ext.h>
31+
#include <stdlib.h>
32+
#include <string.h>
33+
#include <time.h>
34+
#include <threads.h>
35+
#include <uchar.h>
36+
#include <wchar.h>
37+
38+
// C headers that are included with the compiler.
39+
#include <float.h>
40+
#include <iso646.h>
41+
#include <stdarg.h>
42+
#include <stdbool.h>
43+
#include <stddef.h>
44+
#include <tgmath.h>
45+
46+
#include <alloca.h>
47+
#include <ar.h>
48+
#include <cpio.h>
49+
#include <dirent.h>
50+
#include <dlfcn.h>
51+
#include <err.h>
52+
#include <error.h>
53+
#include <execinfo.h>
54+
#include <fcntl.h>
55+
#include <fenv.h>
56+
#include <fnmatch.h>
57+
#include <fts.h>
58+
#include <ftw.h>
59+
#include <getopt.h>
60+
#include <glob.h>
61+
#include <grp.h>
62+
#include <iconv.h>
63+
#include <ifaddrs.h>
64+
#include <jni.h>
65+
#include <langinfo.h>
66+
#include <libgen.h>
67+
#include <link.h>
68+
#include <mntent.h>
69+
#include <netdb.h>
70+
#include <nl_types.h>
71+
#include <paths.h>
72+
#include <poll.h>
73+
#include <pthread.h>
74+
#include <pty.h>
75+
#include <pwd.h>
76+
#include <regex.h>
77+
#include <resolv.h>
78+
#include <sched.h>
79+
#include <search.h>
80+
#include <semaphore.h>
81+
#include <spawn.h>
82+
#include <strings.h>
83+
#include <syscall.h>
84+
#include <sysexits.h>
85+
#include <syslog.h>
86+
#include <tar.h>
87+
#include <termio.h>
88+
#include <termios.h>
89+
#include <uconfig_local.h>
90+
#include <ucontext.h>
91+
#include <unistd.h>
92+
#include <utime.h>
93+
#include <utmp.h>
94+
#include <utmpx.h>
95+
#include <wait.h>
96+
#include <xlocale.h>
97+
98+
#include <arpa/inet.h>
99+
#include <linux/if.h>
100+
#include <net/if.h>
101+
#include <netinet/in.h>
102+
#include <netinet/in6.h>
103+
#include <netinet/tcp.h>
104+
105+
#include <sys/epoll.h>
106+
#include <sys/eventfd.h>
107+
#include <sys/fcntl.h>
108+
#include <sys/file.h>
109+
#include <sys/inotify.h>
110+
#include <sys/ioctl.h>
111+
#include <sys/mount.h>
112+
#include <sys/sendfile.h>
113+
#include <sys/stat.h>
114+
#include <sys/statvfs.h>
115+
#include <sys/vfs.h>
116+
#include <sys/uio.h>
117+
118+
#include <asm-generic/mman-common.h>
119+
#include <sys/endian.h>
120+
#include <sys/errno.h>
121+
#include <sys/ifunc.h>
122+
#include <sys/ipc.h>
123+
#include <sys/ipc.h>
124+
#include <sys/mman.h>
125+
#include <sys/msg.h>
126+
#include <sys/random.h>
127+
#include <sys/resource.h>
128+
#include <sys/select.h>
129+
#include <sys/sem.h>
130+
#include <sys/shm.h>
131+
#include <sys/socket.h>
132+
#include <sys/time.h>
133+
#include <sys/times.h>
134+
#include <sys/types.h>
135+
#include <sys/un.h>
136+
#include <sys/user.h>
137+
#include <sys/utsname.h>
138+
#include <sys/wait.h>
139+
140+
#include <android/api-level.h>
141+
#include <android/asset_manager_jni.h>
142+
#include <android/asset_manager.h>
143+
#include <android/ndk-version.h>
144+
#include <android/log.h>
145+
#include <android/trace.h>
146+
#include <android/versioning.h>
147+
148+
#include <zlib.h>
149+
150+
#endif // SWIFT_ANDROID_NDK_MODULE

stdlib/public/Platform/SwiftBionic.h

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
//===--- SwiftBionic.h ----------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2014 - 2024 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See https://swift.org/LICENSE.txt for license information
9+
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
13+
#ifndef SWIFT_BIONIC_MODULE
14+
#define SWIFT_BIONIC_MODULE
15+
16+
#include <complex.h>
17+
#include <ctype.h>
18+
#include <errno.h>
19+
#include <fenv.h>
20+
#include <inttypes.h>
21+
#include <limits.h>
22+
#include <locale.h>
23+
#include <malloc.h>
24+
#include <math.h>
25+
#include <setjmp.h>
26+
#include <signal.h>
27+
#include <stdatomic.h>
28+
#include <stdint.h>
29+
#include <stdio.h>
30+
#include <stdio_ext.h>
31+
#include <stdlib.h>
32+
#include <string.h>
33+
#include <time.h>
34+
#include <threads.h>
35+
#include <uchar.h>
36+
#include <wchar.h>
37+
38+
#endif // SWIFT_BIONIC_MODULE

0 commit comments

Comments
 (0)