This is an archive of the discontinued LLVM Phabricator instance.

[CMake] Use correct visibility for linked libraries in CMake
ClosedPublic

Authored by phosek on Jan 30 2019, 9:14 AM.

Diff Detail

Event Timeline

phosek created this revision.Jan 30 2019, 9:14 AM

We hit this issue when trying to link libclang_rt.asan.so with static unwinder but shared libc++abi where we would get two different instances of libunwind, one from direct dependency and one from libc++abi.

ldionne accepted this revision.Jan 30 2019, 10:23 AM

THANKS.

This revision is now accepted and ready to land.Jan 30 2019, 10:23 AM

Wait, actually, doesn't CMake handle that automatically? I think that for STATIC libraries, even PRIVATE dependencies are forwarded to dependents, no?

Wait, actually, doesn't CMake handle that automatically? I think that for STATIC libraries, even PRIVATE dependencies are forwarded to dependents, no?

Let me try this, if that's true than we could use PRIVATE everywhere.

phosek updated this revision to Diff 184342.Jan 30 2019, 11:26 AM

We can use PRIVATE everywhere, CMake handles static libraries correctly.

This revision was automatically updated to reflect the committed changes.
phosek reopened this revision.Jan 30 2019, 3:13 PM
This revision is now accepted and ready to land.Jan 30 2019, 3:13 PM
phosek updated this revision to Diff 184384.Jan 30 2019, 3:15 PM
This revision was automatically updated to reflect the committed changes.