mirror of
https://github.com/intel/llvm.git
synced 2026-01-13 19:08:21 +08:00
[libc] Add an option to make libc only build the libc-hdrgen tool
The `libc-hdergen` tool is required for cross-builds, however some cases can cause issues when configuring this build. This patch adds an ovveride option `LIBC_HDRGEN_ONLY` to allow us to retain the old (incorrect) behaviour where `libc` would not build with any other runtimes enabled. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D151155
This commit is contained in:
@@ -28,7 +28,9 @@ if(LLVM_LIBC_FULL_BUILD OR LIBC_GPU_BUILD OR LIBC_GPU_ARCHITECTURES)
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user