Page MenuHomePhabricator

[cmake] Update creation of object library dependencies for LINK_LIBS PUBLIC
ClosedPublic

Authored by stephenneuendorffer on Tue, May 12, 8:51 PM.

Details

Summary

We need to avoid declaring dependencies on strings which are valid
LINK_LIBS and not valid targets. Previously, we used if(TARGET) to
check this condition. However, if(TARGET) checks whether a target has
been created (in the cmake subdirectory traversal order) and not
whether it *will* be created. This results in annoying directory
ordering problems.

This patch changes the check to more explicitly eliminate problematic
libraries (namely -lpthread) using a REGEX.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptTue, May 12, 8:51 PM
mehdi_amini accepted this revision.Tue, May 12, 9:44 PM
mehdi_amini added inline comments.
llvm/cmake/modules/AddLLVM.cmake
487

Probably anything that starts with - isn't intended to be a dependency...

This revision is now accepted and ready to land.Tue, May 12, 9:44 PM
stephenneuendorffer marked an inline comment as done.
This revision was automatically updated to reflect the committed changes.