diff options
author | Siva Chandra Reddy <sivachandra@google.com> | 2023-01-10 08:01:51 +0000 |
---|---|---|
committer | Siva Chandra Reddy <sivachandra@google.com> | 2023-02-06 05:16:27 +0000 |
commit | c4f236e94a4e2df46838a540936bb9b61c771ca1 (patch) | |
tree | ea1adcfd1aa1fa23139dc4d95ae9ab39b7f31d67 /llvm/CMakeLists.txt | |
parent | bb8d719c81c3a290357acd3243c7218994b35cb5 (diff) | |
download | llvm-c4f236e94a4e2df46838a540936bb9b61c771ca1.tar.gz |
[bootstrap build] Add libc-hdrgen as a build dep for libc bootstrap build.
With this change, libc-hdrgen is built like a host build tool like clang and used
to build libc for the target.
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D141460
Diffstat (limited to 'llvm/CMakeLists.txt')
-rw-r--r-- | llvm/CMakeLists.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index 49eabd1df296..8e6b738efd7e 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -168,6 +168,16 @@ foreach(proj IN LISTS LLVM_ENABLE_RUNTIMES) endif() endforeach() +if ("libc" IN_LIST LLVM_ENABLE_RUNTIMES) + # To build the libc runtime, we need to be able to build few libc build + # tools from the "libc" project. So, we add it to the list of enabled + # projects. + if (NOT "libc" IN_LIST LLVM_ENABLE_PROJECTS) + message(STATUS "Enabling libc project to build libc build tools") + list(APPEND LLVM_ENABLE_PROJECTS "libc") + endif() +endif() + # LLVM_ENABLE_PROJECTS_USED is `ON` if the user has ever used the # `LLVM_ENABLE_PROJECTS` CMake cache variable. This exists for # several reasons: |