[libc-commits] [PATCH] D153794: [libc][hdr-gen] Add a new 'include_header' command to control headers

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Jun 26 11:33:37 PDT 2023


jhuber6 created this revision.
jhuber6 added reviewers: sivachandra, lntue, michaelrj.
Herald added projects: libc-project, All.
Herald added a subscriber: libc-commits.
jhuber6 requested review of this revision.

This patch is the first step towards the GPU headers as proposed in
https://discourse.llvm.org/t/rfc-implementing-gpu-headers-in-the-llvm-c-library/71523.
This patch introduces a new `libc-hdrgen` command called
`include_header` that simply replaces its contents with the appropriate
`#include <...>` command. This is necessary because the GPU will want to
conditionally alter these definitions we need access to it
programmattically. The implementation for now is very simple, and I have
replaced all of the existing raw `#include <...>` lines with the new
command.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D153794

Files:
  libc/include/arpa/inet.h.def
  libc/include/assert.h.def
  libc/include/ctype.h.def
  libc/include/dirent.h.def
  libc/include/errno.h.def
  libc/include/fcntl.h.def
  libc/include/fenv.h.def
  libc/include/gpu/rpc.h.def
  libc/include/inttypes.h.def
  libc/include/math.h.def
  libc/include/pthread.h.def
  libc/include/sched.h.def
  libc/include/setjmp.h.def
  libc/include/signal.h.def
  libc/include/spawn.h.def
  libc/include/stdio.h.def
  libc/include/stdlib.h.def
  libc/include/string.h.def
  libc/include/strings.h.def
  libc/include/sys/auxv.h.def
  libc/include/sys/ioctl.h.def
  libc/include/sys/mman.h.def
  libc/include/sys/prctl.h.def
  libc/include/sys/random.h.def
  libc/include/sys/resource.h.def
  libc/include/sys/select.h.def
  libc/include/sys/sendfile.h.def
  libc/include/sys/socket.h.def
  libc/include/sys/stat.h.def
  libc/include/sys/time.h.def
  libc/include/sys/types.h.def
  libc/include/sys/utsname.h.def
  libc/include/sys/wait.h.def
  libc/include/termios.h.def
  libc/include/threads.h.def
  libc/include/time.h.def
  libc/include/unistd.h.def
  libc/include/wchar.h.def
  libc/utils/HdrGen/CMakeLists.txt
  libc/utils/HdrGen/Generator.cpp
  libc/utils/HdrGen/Generator.h
  libc/utils/HdrGen/IncludeHeaderCommand.cpp
  libc/utils/HdrGen/IncludeHeaderCommand.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153794.534671.patch
Type: text/x-patch
Size: 20355 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230626/7ef7e5f1/attachment-0001.bin>


More information about the libc-commits mailing list