The current code seems to assume that any header required by a
particular target is also a dependency of libc.a. If this is not
the case, then the 'install' rule can break because it will try to
install a header file which has not, in fact, been generated.
This is really a fundamental problem with the way that
libc/include/CMakeList.txt manages the install header files and
targets, but there doesn't appear to be a good way to fix it in
current versions of cmake (which are limited in understanding the
interaction between file sets of custom targets and the install
rule).
Details
Details
- Reviewers
sivachandra
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
We never tested this with a make install or ninja install. Would adding EXCLUDE_FROM_ALL here fix your problem: https://github.com/llvm/llvm-project/blob/main/libc/include/CMakeLists.txt#L520. The install-libc-headers target should set up the dependencies correctly and should still work with make install or ninja install: https://github.com/llvm/llvm-project/blob/main/libc/CMakeLists.txt#L215