diff options
Diffstat (limited to 'libc/hdr')
| -rw-r--r-- | libc/hdr/CMakeLists.txt | 18 | ||||
| -rw-r--r-- | libc/hdr/pthread_macros.h | 22 | ||||
| -rw-r--r-- | libc/hdr/stdint_proxy.h | 18 | ||||
| -rw-r--r-- | libc/hdr/types/CMakeLists.txt | 27 | ||||
| -rw-r--r-- | libc/hdr/types/jmp_buf.h | 2 | ||||
| -rw-r--r-- | libc/hdr/types/pthread_barrier_t.h | 22 | ||||
| -rw-r--r-- | libc/hdr/types/pthread_barrierattr_t.h | 22 | ||||
| -rw-r--r-- | libc/hdr/types/sigjmp_buf.h | 22 |
8 files changed, 152 insertions, 1 deletions
diff --git a/libc/hdr/CMakeLists.txt b/libc/hdr/CMakeLists.txt index 052a773a4fce..f3f01c1ed0e3 100644 --- a/libc/hdr/CMakeLists.txt +++ b/libc/hdr/CMakeLists.txt @@ -73,6 +73,15 @@ add_proxy_header_library( ) add_proxy_header_library( + pthread_macros + HDRS + pthread_macros.h + FULL_BUILD_DEPENDS + libc.include.llvm-libc-macros.pthread_macros + libc.include.pthread +) + +add_proxy_header_library( sched_macros HDRS sched_macros.h @@ -243,5 +252,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/pthread_macros.h b/libc/hdr/pthread_macros.h new file mode 100644 index 000000000000..f913015abd31 --- /dev/null +++ b/libc/hdr/pthread_macros.h @@ -0,0 +1,22 @@ +//===-- Definition of macros from pthread.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_PTHREAD_MACROS_H +#define LLVM_LIBC_HDR_PTHREAD_MACROS_H + +#ifdef LIBC_FULL_BUILD + +#include "include/llvm-libc-macros/pthread-macros.h" + +#else // Overlay mode + +#include <pthread.h> + +#endif // LLVM_LIBC_FULL_BUILD + +#endif // LLVM_LIBC_HDR_PTHREAD_MACROS_H diff --git a/libc/hdr/stdint_proxy.h b/libc/hdr/stdint_proxy.h new file mode 100644 index 000000000000..8e815679a4e2 --- /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 f3bdc9f6aedd..1c1f242e8434 100644 --- a/libc/hdr/types/CMakeLists.txt +++ b/libc/hdr/types/CMakeLists.txt @@ -94,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 ) @@ -104,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 ) @@ -240,6 +242,22 @@ add_proxy_header_library( ) add_proxy_header_library( + pthread_barrier_t + HDRS + pthread_barrier_t.h + FULL_BUILD_DEPENDS + libc.include.llvm-libc-types.pthread_barrier_t +) + +add_proxy_header_library( + pthread_barrierattr_t + HDRS + pthread_barrierattr_t.h + FULL_BUILD_DEPENDS + libc.include.llvm-libc-types.pthread_barrierattr_t +) + +add_proxy_header_library( atexithandler_t HDRS atexithandler_t.h @@ -318,6 +336,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 3fa1de816d70..b242f84f221f 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/pthread_barrier_t.h b/libc/hdr/types/pthread_barrier_t.h new file mode 100644 index 000000000000..57bcdfc6a990 --- /dev/null +++ b/libc/hdr/types/pthread_barrier_t.h @@ -0,0 +1,22 @@ +//===-- Definition of macros from pthread_barrier_t.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_TYPES_PTHREAD_BARRIER_T_H +#define LLVM_LIBC_HDR_TYPES_PTHREAD_BARRIER_T_H + +#ifdef LIBC_FULL_BUILD + +#include "include/llvm-libc-types/pthread_barrier_t.h" + +#else // Overlay mode + +#error "Cannot overlay pthread_barrier_t" + +#endif // LLVM_LIBC_FULL_BUILD + +#endif // LLVM_LIBC_HDR_TYPES_PTHREAD_BARRIER_T_H diff --git a/libc/hdr/types/pthread_barrierattr_t.h b/libc/hdr/types/pthread_barrierattr_t.h new file mode 100644 index 000000000000..d9d14c12e4de --- /dev/null +++ b/libc/hdr/types/pthread_barrierattr_t.h @@ -0,0 +1,22 @@ +//===-- Definition of macros from pthread_barrierattr_t.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_TYPES_PTHREAD_BARRIERATTR_T_H +#define LLVM_LIBC_HDR_TYPES_PTHREAD_BARRIERATTR_T_H + +#ifdef LIBC_FULL_BUILD + +#include "include/llvm-libc-types/pthread_barrierattr_t.h" + +#else // Overlay mode + +#error "Cannot overlay pthread_barrierattr_t" + +#endif // LLVM_LIBC_FULL_BUILD + +#endif // LLVM_LIBC_HDR_TYPES_PTHREAD_BARRIERATTR_T_H diff --git a/libc/hdr/types/sigjmp_buf.h b/libc/hdr/types/sigjmp_buf.h new file mode 100644 index 000000000000..5da52435dcb6 --- /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 |
