[libc] Add an option to make `libc` only build the `libc-hdrgen` tool
authorJoseph Huber <jhuber6@vols.utk.edu>
Mon, 22 May 2023 21:00:41 +0000 (16:00 -0500)
committerJoseph Huber <jhuber6@vols.utk.edu>
Tue, 23 May 2023 03:24:57 +0000 (22:24 -0500)
commit4fafa39b76b8e11960a75d7b15d762840330ecbf
tree8a8963b047e807f2853df0a7e92562276f6fa4f1
parent52bc4b16cb68d6d64c0d9499b2e6c1d719e78085
[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
libc/CMakeLists.txt