diff --git a/libc/lib/CMakeLists.txt b/libc/lib/CMakeLists.txt --- a/libc/lib/CMakeLists.txt +++ b/libc/lib/CMakeLists.txt @@ -34,6 +34,13 @@ ARCHIVE_OUTPUT_NAME ${archive_0} ) list(APPEND added_archive_targets ${archive_1}) + + # The dependency below is necessary because it's possible for libc-headers to generate + # and want to install headers that no component entrypoint depends on. + # This causes issues when running 'make install' because libc-headers is all implemented + # with custom targets and there is not good support for describing install dependencies + # on custom targets. + add_dependencies(${archive_1} libc-headers) endforeach() if(LIBC_TARGET_TRIPLE)