This is an archive of the discontinued LLVM Phabricator instance.

[libc++][CMake] Refactor how we link against system libraries
ClosedPublic

Authored by ldionne on Apr 22 2019, 10:12 AM.

Details

Summary

Instead of populating the global LIBCXX_LIBRARIES, we use the link-time
dependency management built into CMake to propagate link flags. This
leads to a cleaner and easier-to-follow build.

Event Timeline

ldionne created this revision.Apr 22 2019, 10:12 AM
Herald added a project: Restricted Project. · View Herald Transcript
ldionne marked an inline comment as done.Apr 22 2019, 10:13 AM
ldionne added inline comments.
libcxx/lib/CMakeLists.txt
394

This is now handled by CMake automatically, because benchmarks link against cxx_shared or cxx_static, and those have PUBLIC link dependencies.

smeenai accepted this revision.Apr 25 2019, 10:30 PM

This is awesome!

Can we get rid of add_library_flags and add_library_flags_if now?

This revision is now accepted and ready to land.Apr 25 2019, 10:30 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 30 2019, 8:43 AM