File tree Expand file tree Collapse file tree 7 files changed +184
-500
lines changed Expand file tree Collapse file tree 7 files changed +184
-500
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,13 @@ foreach(sdk ${SWIFT_SDKS})
119
119
list (APPEND glibc_modulemap_target_list ${copy_glibc_modulemap_static} )
120
120
endif ()
121
121
122
+ set (glibc_header_out "${module_dir} /SwiftGlibc.h" )
123
+ handle_gyb_source_single (glibc_header_target
124
+ SOURCE "SwiftGlibc.h.gyb"
125
+ OUTPUT "${glibc_header_out} "
126
+ FLAGS "-DCMAKE_SDK=${sdk} " )
127
+ list (APPEND glibc_modulemap_target_list ${glibc_header_target} )
128
+
122
129
# If this SDK is a target for a non-native host, except if it's for Android
123
130
# with its own native sysroot, create a native modulemap without a sysroot
124
131
# prefix. This is the one we'll install instead.
@@ -150,11 +157,17 @@ foreach(sdk ${SWIFT_SDKS})
150
157
swift_install_in_component (FILES "${glibc_modulemap_out} "
151
158
DESTINATION "lib/swift/${arch_subdir} "
152
159
COMPONENT sdk-overlay )
160
+ swift_install_in_component (FILES "${glibc_header_out} "
161
+ DESTINATION "lib/swift/${arch_subdir} "
162
+ COMPONENT sdk-overlay )
153
163
154
164
if (SWIFT_BUILD_STATIC_STDLIB )
155
165
swift_install_in_component (FILES "${glibc_modulemap_out} "
156
166
DESTINATION "lib/swift_static/${arch_subdir} "
157
167
COMPONENT sdk-overlay )
168
+ swift_install_in_component (FILES "${glibc_header_out} "
169
+ DESTINATION "lib/swift_static/${arch_subdir} "
170
+ COMPONENT sdk-overlay )
158
171
endif ()
159
172
endforeach ()
160
173
endforeach ()
Original file line number Diff line number Diff line change
1
+ %{
2
+ headers = [
3
+ 'stdc-predef.h',
4
+ 'features.h',
5
+
6
+ # C standard library
7
+ 'complex.h',
8
+ 'ctype.h',
9
+ 'errno.h',
10
+ 'fenv.h',
11
+ 'float.h',
12
+ 'inttypes.h',
13
+ 'iso646.h',
14
+ 'libutil.h',
15
+ 'limits.h',
16
+ 'locale.h',
17
+ 'math.h',
18
+ 'pty.h',
19
+ 'setjmp.h',
20
+ 'signal.h',
21
+ 'stdarg.h',
22
+ 'stdbool.h',
23
+ 'stddef.h',
24
+ 'stdint.h',
25
+ 'stdio.h',
26
+ 'stdlib.h',
27
+ 'string.h',
28
+ 'tgmath.h',
29
+ 'time.h',
30
+ 'utmp.h',
31
+ 'utmpx.h',
32
+
33
+ # POSIX
34
+ 'aio.h',
35
+ 'arpa/inet.h',
36
+ 'bsd/ifaddrs.h',
37
+ 'bsd/pty.h',
38
+ 'cpio.h',
39
+ 'dirent.h',
40
+ 'dlfcn.h',
41
+ 'fcntl.h',
42
+ 'fmtmsg.h',
43
+ 'fnmatch.h',
44
+ 'ftw.h',
45
+ 'glob.h',
46
+ 'grp.h',
47
+ 'iconv.h',
48
+ 'ifaddrs.h',
49
+ 'langinfo.h',
50
+ 'libgen.h',
51
+ 'link.h',
52
+ 'monetary.h',
53
+ 'net/if.h',
54
+ 'netdb.h',
55
+ 'netinet/in.h',
56
+ 'netinet/tcp.h',
57
+ 'nl_types.h',
58
+ 'poll.h',
59
+ 'pthread.h',
60
+ 'pwd.h',
61
+ 'regex.h',
62
+ 'sched.h',
63
+ 'search.h',
64
+ 'semaphore.h',
65
+ 'spawn.h',
66
+ 'strings.h',
67
+ 'sys/event.h',
68
+ 'sys/file.h',
69
+ 'sys/inotify.h',
70
+ 'sys/ioctl.h',
71
+ 'sys/ipc.h',
72
+ 'sys/mman.h',
73
+ 'sys/msg.h',
74
+ 'sys/resource.h',
75
+ 'sys/select.h',
76
+ 'sys/sem.h',
77
+ 'sys/sendfile.h',
78
+ 'sys/shm.h',
79
+ 'sys/socket.h',
80
+ 'sys/stat.h',
81
+ 'sys/statvfs.h',
82
+ 'sys/time.h',
83
+ 'sys/times.h',
84
+ 'sys/types.h',
85
+ 'sys/uio.h',
86
+ 'sys/un.h',
87
+ 'sys/user.h',
88
+ 'sys/utsname.h',
89
+ 'sys/wait.h',
90
+ 'sysexits.h',
91
+ 'syslog.h',
92
+ 'tar.h',
93
+ 'termios.h',
94
+ 'ulimit.h',
95
+ 'unistd.h',
96
+ 'utime.h',
97
+ 'utmpx.h',
98
+ 'wait.h',
99
+ 'wordexp.h',
100
+ ]
101
+ }%
102
+
103
+ % for header in headers:
104
+ #if __has_include(<${header}>)
105
+ #include <${header}>
106
+ #endif
107
+ % end
You can’t perform that action at this time.
0 commit comments