aboutsummaryrefslogtreecommitdiff
path: root/libc/hdr
diff options
context:
space:
mode:
Diffstat (limited to 'libc/hdr')
-rw-r--r--libc/hdr/CMakeLists.txt9
-rw-r--r--libc/hdr/stdint_proxy.h18
-rw-r--r--libc/hdr/types/CMakeLists.txt13
-rw-r--r--libc/hdr/types/jmp_buf.h2
-rw-r--r--libc/hdr/types/sigjmp_buf.h22
5 files changed, 63 insertions, 1 deletions
diff --git a/libc/hdr/CMakeLists.txt b/libc/hdr/CMakeLists.txt
index 052a773..5fc25d0 100644
--- a/libc/hdr/CMakeLists.txt
+++ b/libc/hdr/CMakeLists.txt
@@ -243,5 +243,14 @@ add_proxy_header_library(
libc.include.llvm-libc-macros.offsetof_macro
)
+# stdint.h header.
+add_proxy_header_library(
+ stdint_proxy
+ HDRS
+ stdint_proxy.h
+ FULL_BUILD_DEPENDS
+ libc.include.stdint
+)
+
add_subdirectory(types)
add_subdirectory(func)
diff --git a/libc/hdr/stdint_proxy.h b/libc/hdr/stdint_proxy.h
new file mode 100644
index 0000000..8e81567
--- /dev/null
+++ b/libc/hdr/stdint_proxy.h
@@ -0,0 +1,18 @@
+//===-- stdint.h ----------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_HDR_STDINT_PROXY_H
+#define LLVM_LIBC_HDR_STDINT_PROXY_H
+
+// This target is to make sure we have correct build order in full build mode,
+// that is `libc.include.stdint` is added to the dependency of all targets
+// that use <stdint.h> header.
+
+#include <stdint.h>
+
+#endif // LLVM_LIBC_HDR_STDINT_PROXY_H
diff --git a/libc/hdr/types/CMakeLists.txt b/libc/hdr/types/CMakeLists.txt
index e4b3cb0..c212363 100644
--- a/libc/hdr/types/CMakeLists.txt
+++ b/libc/hdr/types/CMakeLists.txt
@@ -26,6 +26,8 @@ add_proxy_header_library(
mbstate_t.h
DEPENDS
libc.include.llvm-libc-types.mbstate_t
+ FULL_BUILD_DEPENDS
+ libc.include.uchar
)
add_proxy_header_library(
@@ -92,6 +94,7 @@ add_proxy_header_library(
DEPENDS
libc.hdr.fcntl_overlay
FULL_BUILD_DEPENDS
+ libc.hdr.stdint_proxy
libc.include.llvm-libc-types.struct_flock
)
@@ -102,6 +105,7 @@ add_proxy_header_library(
DEPENDS
libc.hdr.fcntl_overlay
FULL_BUILD_DEPENDS
+ libc.hdr.stdint_proxy
libc.include.llvm-libc-types.struct_flock64
)
@@ -316,6 +320,15 @@ add_proxy_header_library(
)
add_proxy_header_library(
+ sigjmp_buf
+ HDRS
+ sigjmp_buf.h
+ FULL_BUILD_DEPENDS
+ libc.include.llvm-libc-types.sigjmp_buf
+ libc.include.setjmp
+)
+
+add_proxy_header_library(
struct_msghdr
HDRS
struct_msghdr.h
diff --git a/libc/hdr/types/jmp_buf.h b/libc/hdr/types/jmp_buf.h
index 3fa1de8..b242f84 100644
--- a/libc/hdr/types/jmp_buf.h
+++ b/libc/hdr/types/jmp_buf.h
@@ -1,4 +1,4 @@
-//===-- Definition of jmp_buf.h ------------------------------------------===//
+//===-- Definition of jmp_buf.h -------------------------------------------===//
//
// Part of the LLVM Project, under the Apahce License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
diff --git a/libc/hdr/types/sigjmp_buf.h b/libc/hdr/types/sigjmp_buf.h
new file mode 100644
index 0000000..5da5243
--- /dev/null
+++ b/libc/hdr/types/sigjmp_buf.h
@@ -0,0 +1,22 @@
+//===-- Definition of sigjmp_buf.h ----------------------------------------===//
+//
+// Part of the LLVM Project, under the Apahce License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_HDR_TYPES_SIGJMP_BUF_H
+#define LLVM_LIBC_HDR_TYPES_SIGJMP_BUF_H
+
+#ifdef LIBC_FULL_BUILD
+
+#include "include/llvm-libc-types/sigjmp_buf.h"
+
+#else // overlay mode
+
+#include <setjmp.h>
+
+#endif // LLVM_LIBC_FULL_BUILD
+
+#endif // LLVM_LIBC_HDR_TYPES_SIGJMP_BUF_H