llvm-capstone/libc/include
Joseph Huber 2a65d0388c [libc] Add support for creating wrapper headers for offloading in clang
This is an alternate approach to the patches proposed in D153897 and
D153794. Rather than exporting a single header that can be included on
the GPU in all circumstances, this patch chooses to instead generate a
separate set of headers that only provides the declarations. This can
then be used by external tooling to set up what's on the GPU. This
leaves room for header hacks for offloading languages without needing to
worry about the `libc` implementation.

Currently this generates a set of headers that only contain the
declarations. These will then be installed to a new clang resource
directory called `llvm_libc_wrappers/` which will house the shim code.
We can then automaticlaly include this from `clang` when offloading to
wrap around the headers while specifying what's on the GPU.

Reviewed By: jdoerfert, JonChesterfield

Differential Revision: https://reviews.llvm.org/D154036
2023-07-07 16:02:33 -05:00
..
arpa [libc] Implement htonl and htons 2023-02-16 10:12:18 -08:00
gpu [libc] Export GPU extensions to libc for external use 2023-06-15 11:02:24 -05:00
llvm-libc-macros [libc] Correct usage of __unix__ and __linux__ 2023-07-03 01:08:15 +01:00
llvm-libc-types [libc] Support fopen / fclose on the GPU 2023-07-05 18:31:58 -05:00
sys [libc] Introduce sys/socket.h 2023-02-23 07:11:20 +00:00
__llvm-libc-common.h [libc] add noexcept to external function headers 2023-01-06 11:43:43 -08:00
assert.h.def
CMakeLists.txt [libc] Add support for creating wrapper headers for offloading in clang 2023-07-07 16:02:33 -05:00
ctype.h.def
dirent.h.def [libc] Add dirent.h functions opendir, readdir, closedir and dirfd. 2022-07-25 20:23:25 +00:00
errno.h.def [libc] Ignore 'errno' on the GPU and support 'atoi' 2023-04-25 12:41:20 -05:00
fcntl.h.def [libc] Add POSIX close, fsync, open, read and write functions. 2022-01-27 20:32:02 +00:00
fenv.h.def [libc] Move math.h and fenv.h macro definitions to llvm-libc-macros. 2023-03-07 18:08:52 +00:00
inttypes.h.def
math.h.def [libc] Move math.h and fenv.h macro definitions to llvm-libc-macros. 2023-03-07 18:08:52 +00:00
pthread.h.def [libc] Add implementation of pthread_once. 2022-09-28 06:54:48 +00:00
sched.h.def [libc] add CPU_COUNT macro and backing function 2022-10-04 15:22:55 -07:00
setjmp.h.def [libc] Add x86_64 implementation of setjmp and longjmp. 2022-11-01 22:58:35 +00:00
signal.h.def [libc] Re-enable functions from signal.h and re-enable abort. 2022-09-30 07:31:50 +00:00
spawn.h.def [libc] Add POSIX functions posix_spawn_file_actions_*. 2022-10-11 04:54:44 +00:00
stdio.h.def [libc] Add definitions of a few missing macros and types. 2022-11-02 07:17:33 +00:00
stdlib.h.def [libc] implement basic rand and srand 2022-10-04 13:31:26 -07:00
string.h.def [libc][NFC] Simplify how the definiton of NULL macro is added to string.h. 2022-12-20 19:14:27 +00:00
strings.h.def [libc] Move b* string functions to strings.h 2023-01-09 20:16:20 +00:00
termios.h.def [libc] Add termios.h and the implementation of functions declared in it. 2022-10-18 20:53:00 +00:00
threads.h.def [libc] Move the remaining public types to their own type headers. 2022-01-20 23:04:26 +00:00
time.h.def [libc] add clock_gettime 2022-09-29 10:23:21 -07:00
unistd.h.def [libc] Add implementation of POSIX function "access". 2022-09-14 07:44:47 +00:00
wchar.h.def [libc] add basic wide char functions 2023-03-20 16:36:21 -07:00