[libc-commits] [PATCH] D151155: [libc] Add an option to make `libc` only build the `libc-hdrgen` tool

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon May 22 17:50:06 PDT 2023


jhuber6 updated this revision to Diff 524546.
jhuber6 added a comment.

Add option.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151155/new/

https://reviews.llvm.org/D151155

Files:
  libc/CMakeLists.txt


Index: libc/CMakeLists.txt
===================================================================
--- libc/CMakeLists.txt
+++ libc/CMakeLists.txt
@@ -28,7 +28,9 @@
   endif()
 endif()
 
-if("libc" IN_LIST LLVM_ENABLE_RUNTIMES AND NOT LLVM_RUNTIMES_BUILD)
+option(LIBC_HDRGEN_ONLY "Only build the 'libc-hdrgen' executable" OFF)
+if(("libc" IN_LIST LLVM_ENABLE_RUNTIMES AND NOT LLVM_RUNTIMES_BUILD) OR 
+   LIBC_HDRGEN_ONLY)
   # When libc is build as part of the runtimes/bootstrap build's CMake run, we
   # only need to build the host tools to build the libc. So, we just do enough
   # to build libc-hdrgen and return.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151155.524546.patch
Type: text/x-patch
Size: 618 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230523/01b25e1e/attachment.bin>


More information about the libc-commits mailing list