-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[stdlib] Get rid of the single bridging header for ELF platforms like linux #66665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,114 @@ module SwiftGlibc [system] { | |
link "execinfo" | ||
% end | ||
|
||
header "SwiftGlibc.h" | ||
% if CMAKE_SDK not in ["ANDROID"]: | ||
header "stdc-predef.h" | ||
header "features.h" | ||
% end | ||
|
||
// C standard library | ||
header "complex.h" | ||
header "ctype.h" | ||
header "errno.h" | ||
header "fenv.h" | ||
header "inttypes.h" | ||
% if CMAKE_SDK not in ["LINUX", "ANDROID"]: | ||
header "libutil.h" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I checked all these headers in glibc too, and both Bionic and glibc don't have this. I only see a If this header is wanted on linux, I can change this to |
||
% end | ||
header "locale.h" | ||
header "math.h" | ||
header "pty.h" | ||
header "setjmp.h" | ||
header "signal.h" | ||
header "stdio.h" | ||
header "stdlib.h" | ||
header "string.h" | ||
header "time.h" | ||
% if CMAKE_SDK in ["OPENBSD"]: | ||
header "util.h" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @3405691582 added this for his OpenBSD port, and neither glibc nor Bionic have it. |
||
% end | ||
header "utmp.h" | ||
|
||
// POSIX | ||
% if CMAKE_SDK not in ["ANDROID"]: | ||
header "aio.h" | ||
% end | ||
header "arpa/inet.h" | ||
% if CMAKE_SDK not in ["LINUX", "ANDROID"]: | ||
header "bsd/ifaddrs.h" | ||
header "bsd/pty.h" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
% end | ||
header "cpio.h" | ||
header "dirent.h" | ||
header "dlfcn.h" | ||
header "fcntl.h" | ||
% if CMAKE_SDK not in ["ANDROID"]: | ||
header "fmtmsg.h" | ||
% end | ||
header "fnmatch.h" | ||
header "ftw.h" | ||
header "glob.h" | ||
header "grp.h" | ||
header "iconv.h" | ||
header "ifaddrs.h" | ||
header "langinfo.h" | ||
header "libgen.h" | ||
header "link.h" | ||
% if CMAKE_SDK not in ["ANDROID"]: | ||
header "monetary.h" | ||
% end | ||
header "net/if.h" | ||
header "netdb.h" | ||
header "netinet/in.h" | ||
header "netinet/tcp.h" | ||
header "nl_types.h" | ||
header "poll.h" | ||
header "pthread.h" | ||
header "pwd.h" | ||
header "regex.h" | ||
header "sched.h" | ||
header "search.h" | ||
header "semaphore.h" | ||
header "spawn.h" | ||
header "strings.h" | ||
% if CMAKE_SDK not in ["LINUX", "ANDROID"]: | ||
header "sys/event.h" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only one Ubuntu package, |
||
% end | ||
header "x86_64-linux-gnu/sys/file.h" | ||
header "x86_64-linux-gnu/sys/inotify.h" | ||
header "x86_64-linux-gnu/sys/ioctl.h" | ||
header "x86_64-linux-gnu/sys/ipc.h" | ||
header "x86_64-linux-gnu/sys/mman.h" | ||
header "x86_64-linux-gnu/sys/mount.h" | ||
header "x86_64-linux-gnu/sys/msg.h" | ||
header "x86_64-linux-gnu/sys/resource.h" | ||
header "x86_64-linux-gnu/sys/select.h" | ||
header "x86_64-linux-gnu/sys/sem.h" | ||
header "x86_64-linux-gnu/sys/sendfile.h" | ||
header "x86_64-linux-gnu/sys/shm.h" | ||
header "x86_64-linux-gnu/sys/socket.h" | ||
header "x86_64-linux-gnu/sys/stat.h" | ||
header "x86_64-linux-gnu/sys/statvfs.h" | ||
header "x86_64-linux-gnu/sys/time.h" | ||
header "x86_64-linux-gnu/sys/times.h" | ||
header "x86_64-linux-gnu/sys/types.h" | ||
header "x86_64-linux-gnu/sys/uio.h" | ||
header "x86_64-linux-gnu/sys/un.h" | ||
header "x86_64-linux-gnu/sys/user.h" | ||
header "x86_64-linux-gnu/sys/utsname.h" | ||
header "x86_64-linux-gnu/sys/wait.h" | ||
header "sysexits.h" | ||
header "syslog.h" | ||
header "tar.h" | ||
header "termios.h" | ||
header "unistd.h" | ||
header "utime.h" | ||
header "wait.h" | ||
% if CMAKE_SDK not in ["ANDROID"]: | ||
header "ulimit.h" | ||
header "utmpx.h" | ||
header "wordexp.h" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried to keep the ordering of headers the same throughout, in case that matters, but shifted these last two. I can keep them separately above if the order matters. |
||
% end | ||
|
||
// <assert.h>'s use of NDEBUG requires textual inclusion. | ||
textual header "assert.h" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these headers were removed for Android because they don't exist in Bionic, except for
features.h
, which is only in Bionic for glibc compatibility and is unnecessary plus it causes build issues in C++ Interop.