You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

141 lines
3.8 KiB

diff --git a/swift/stdlib/public/Platform/glibc.modulemap.gyb b/swift/stdlib/public/Platform/glibc.modulemap.gyb
index b024b92f7f..a460615e46 100644
--- a/swift/stdlib/public/Platform/glibc.modulemap.gyb
+++ b/swift/stdlib/public/Platform/glibc.modulemap.gyb
@@ -47,13 +47,13 @@ module SwiftGlibc [system] {
export *
}
% end
-% if CMAKE_SDK in ["LINUX", "FREEBSD", "CYGWIN", "HAIKU"]:
+% if CMAKE_SDK in ["LINUX", "FREEBSD", "CYGWIN", "HAIKU", "ANDROID"]:
module complex {
header "${GLIBC_INCLUDE_PATH}/complex.h"
export *
}
% end
-% if CMAKE_SDK in ["LINUX", "CYGWIN"]:
+% if CMAKE_SDK in ["LINUX", "CYGWIN", "ANDROID"]:
module pty {
header "${GLIBC_INCLUDE_PATH}/pty.h"
export *
@@ -181,7 +181,7 @@ module SwiftGlibc [system] {
// POSIX
module POSIX {
-% if CMAKE_SDK in ["LINUX", "CYGWIN"]:
+% if CMAKE_SDK in ["LINUX", "CYGWIN", "ANDROID"]:
module wait {
header "${GLIBC_INCLUDE_PATH}/wait.h"
export *
@@ -210,8 +210,26 @@ module SwiftGlibc [system] {
export *
}
% end
+% if CMAKE_SDK == "ANDROID":
+ module cpio {
+ header "${GLIBC_INCLUDE_PATH}/cpio.h"
+ export *
+ }
+ module nl_types {
+ header "${GLIBC_INCLUDE_PATH}/nl_types.h"
+ export *
+ }
+ module bits {
+ export *
-% if CMAKE_SDK in ["LINUX", "FREEBSD", "CYGWIN"]:
+ module fcntl {
+ header "${GLIBC_INCLUDE_PATH}/bits/fcntl.h"
+ export *
+ }
+ }
+% end
+
+% if CMAKE_SDK in ["LINUX", "FREEBSD", "CYGWIN", "ANDROID"]:
module ftw {
header "${GLIBC_INCLUDE_PATH}/ftw.h"
export *
@@ -228,10 +246,12 @@ module SwiftGlibc [system] {
header "${GLIBC_INCLUDE_PATH}/langinfo.h"
export *
}
+% if CMAKE_SDK != "ANDROID":
module monetary {
header "${GLIBC_INCLUDE_PATH}/monetary.h"
export *
}
+% end
module netdb {
header "${GLIBC_INCLUDE_PATH}/netdb.h"
export *
@@ -256,6 +276,7 @@ module SwiftGlibc [system] {
header "${GLIBC_INCLUDE_PATH}/tar.h"
export *
}
+% if CMAKE_SDK != "ANDROID":
module utmpx {
header "${GLIBC_INCLUDE_PATH}/utmpx.h"
export *
@@ -265,6 +286,7 @@ module SwiftGlibc [system] {
export *
}
% end
+% end
% if CMAKE_SDK == "HAIKU":
module ftw {
@@ -393,11 +415,16 @@ module SwiftGlibc [system] {
module sys {
export *
-% if CMAKE_SDK in ["LINUX", "FREEBSD", "CYGWIN", "HAIKU"]:
+% if CMAKE_SDK in ["LINUX", "FREEBSD", "CYGWIN", "HAIKU", "ANDROID"]:
+ module cdefs {
+ header "${GLIBC_ARCH_INCLUDE_PATH}/sys/cdefs.h"
+ export *
+ }
module file {
header "${GLIBC_ARCH_INCLUDE_PATH}/sys/file.h"
export *
}
+% if CMAKE_SDK != "ANDROID":
module sem {
header "${GLIBC_ARCH_INCLUDE_PATH}/sys/sem.h"
export *
@@ -407,6 +434,7 @@ module SwiftGlibc [system] {
header "${GLIBC_ARCH_INCLUDE_PATH}/sys/shm.h"
export *
}
+% end
% end
module statvfs {
header "${GLIBC_ARCH_INCLUDE_PATH}/sys/statvfs.h"
@@ -474,7 +502,7 @@ module SwiftGlibc [system] {
header "${GLIBC_ARCH_INCLUDE_PATH}/sys/un.h"
export *
}
-% if CMAKE_SDK in ["LINUX"]:
+% if CMAKE_SDK in ["LINUX", "ANDROID"]:
module user {
header "${GLIBC_ARCH_INCLUDE_PATH}/sys/user.h"
export *
@@ -489,7 +517,7 @@ module SwiftGlibc [system] {
export *
}
}
-% if CMAKE_SDK in ["LINUX", "FREEBSD"]:
+% if CMAKE_SDK in ["LINUX", "FREEBSD", "ANDROID"]:
module sysexits {
header "${GLIBC_INCLUDE_PATH}/sysexits.h"
export *
@@ -510,8 +538,10 @@ module SwiftGlibc [system] {
}
}
+% if CMAKE_SDK != "ANDROID":
module CUUID [system] {
header "${GLIBC_INCLUDE_PATH}/uuid/uuid.h"
link "uuid"
export *
}
+% end