Skip to content

Commit fc69722

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 55c4956 commit fc69722

File tree

3 files changed

+579
-0
lines changed

3 files changed

+579
-0
lines changed
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
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 "pty.h"
26+
#include "setjmp.h"
27+
#include "signal.h"
28+
#include "stdatomic.h"
29+
#include "stdint.h"
30+
#include "stdio.h"
31+
#include "stdio_ext.h"
32+
#include "stdlib.h"
33+
#include "string.h"
34+
#include "time.h"
35+
#include "utmp.h"
36+
37+
#include "alloca.h"
38+
#include "ar.h"
39+
#include "cpio.h"
40+
#include "dirent.h"
41+
#include "dlfcn.h"
42+
#include "err.h"
43+
#include "error.h"
44+
#include "execinfo.h"
45+
#include "fcntl.h"
46+
#include "fenv.h"
47+
#include "fnmatch.h"
48+
#include "fts.h"
49+
#include "ftw.h"
50+
#include "getopt.h"
51+
#include "glob.h"
52+
#include "grp.h"
53+
#include "iconv.h"
54+
#include "ifaddrs.h"
55+
#include "jni.h"
56+
#include "langinfo.h"
57+
#include "libgen.h"
58+
#include "link.h"
59+
#include "mntent.h"
60+
#include "netdb.h"
61+
#include "nl_types.h"
62+
#include "paths.h"
63+
#include "poll.h"
64+
#include "pthread.h"
65+
#include "pwd.h"
66+
#include "regex.h"
67+
#include "resolv.h"
68+
#include "sched.h"
69+
#include "search.h"
70+
#include "semaphore.h"
71+
#include "spawn.h"
72+
#include "strings.h"
73+
#include "syscall.h"
74+
#include "sysexits.h"
75+
#include "syslog.h"
76+
#include "tar.h"
77+
#include "termio.h"
78+
#include "termios.h"
79+
#include "threads.h"
80+
#include "uchar.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 "wchar.h"
89+
#include "xlocale.h"
90+
91+
#include "arpa/inet.h"
92+
#include "linux/if.h"
93+
#include "netinet/in.h"
94+
#include "netinet/in6.h"
95+
96+
#include "android/api-level.h"
97+
#include "android/asset_manager_jni.h"
98+
#include "android/asset_manager.h"
99+
#include "android/ndk-version.h"
100+
#include "android/log.h"
101+
#include "android/trace.h"
102+
#include "android/versioning.h"
103+
104+
#include "zlib.h"
105+
106+
#endif // SWIFT_ANDROID_NDK_MODULE

stdlib/public/Platform/SwiftBionic.h

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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 "pty.h"
26+
#include "setjmp.h"
27+
#include "signal.h"
28+
#include "stdatomic.h"
29+
#include "stdint.h"
30+
#include "stdio.h"
31+
#include "stdio_ext.h"
32+
#include "stdlib.h"
33+
#include "string.h"
34+
#include "time.h"
35+
#include "utmp.h"
36+
37+
#endif // SWIFT_BIONIC_MODULE

0 commit comments

Comments
 (0)