Page MenuHomePhabricator

[libc] Extend add_object rule to handle helper object libraries.
ClosedPublic

Authored by sivachandra on Wed, Mar 25, 10:08 PM.

Details

Summary

The rule is now called add_object_library.

Diff Detail

Event Timeline

sivachandra created this revision.Wed, Mar 25, 10:08 PM
abrachet accepted this revision.Thu, Mar 26, 4:37 PM
abrachet added inline comments.
libc/cmake/modules/LLVMLibCRules.cmake
117–118

Nit: this could say requires SRCS to be specified.

238

Why not from add_entrypoint_object targets?

This revision is now accepted and ready to land.Thu, Mar 26, 4:37 PM
sivachandra marked 2 inline comments as done.Sat, Mar 28, 12:00 AM
sivachandra added inline comments.
libc/cmake/modules/LLVMLibCRules.cmake
238

Essentially to avoid inconsistency. Either we get object files from all of the entrypoint deps, or from none of them. We cannot get from all of them as CMake might not have seen some of them yet. In case of object library deps though, we are enforcing that they be visible. This is not really a big ask as object libraries are usually helper libraries for a bunch of related functions.

That said, if we move to CMake 3.15, the widely expanded generator support could allow us to simplify and improve the situation here.

This revision was automatically updated to reflect the committed changes.