Skip to content

Commit cdc0892

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 d7426e2 commit cdc0892

File tree

3 files changed

+808
-0
lines changed

3 files changed

+808
-0
lines changed
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
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+
#include <alloca.h>
39+
#include <ar.h>
40+
#include <cpio.h>
41+
#include <dirent.h>
42+
#include <dlfcn.h>
43+
#include <err.h>
44+
#include <error.h>
45+
#include <execinfo.h>
46+
#include <fcntl.h>
47+
#include <fenv.h>
48+
#include <fnmatch.h>
49+
#include <fts.h>
50+
#include <ftw.h>
51+
#include <getopt.h>
52+
#include <glob.h>
53+
#include <grp.h>
54+
#include <iconv.h>
55+
#include <ifaddrs.h>
56+
#include <jni.h>
57+
#include <langinfo.h>
58+
#include <libgen.h>
59+
#include <link.h>
60+
#include <mntent.h>
61+
#include <netdb.h>
62+
#include <nl_types.h>
63+
#include <paths.h>
64+
#include <poll.h>
65+
#include <pthread.h>
66+
#include <pty.h>
67+
#include <pwd.h>
68+
#include <regex.h>
69+
#include <resolv.h>
70+
#include <sched.h>
71+
#include <search.h>
72+
#include <semaphore.h>
73+
#include <spawn.h>
74+
#include <strings.h>
75+
#include <syscall.h>
76+
#include <sysexits.h>
77+
#include <syslog.h>
78+
#include <tar.h>
79+
#include <termio.h>
80+
#include <termios.h>
81+
#include <uconfig_local.h>
82+
#include <ucontext.h>
83+
#include <unistd.h>
84+
#include <utime.h>
85+
#include <utmp.h>
86+
#include <utmpx.h>
87+
#include <wait.h>
88+
#include <xlocale.h>
89+
90+
#include <arpa/inet.h>
91+
#include <linux/if.h>
92+
#include <netinet/in.h>
93+
#include <netinet/in6.h>
94+
95+
#include <android/api-level.h>
96+
#include <android/asset_manager_jni.h>
97+
#include <android/asset_manager.h>
98+
#include <android/ndk-version.h>
99+
#include <android/log.h>
100+
#include <android/trace.h>
101+
#include <android/versioning.h>
102+
103+
#include <zlib.h>
104+
105+
#endif // SWIFT_ANDROID_NDK_MODULE

stdlib/public/Platform/SwiftBionic.h

Lines changed: 38 additions & 0 deletions
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)