This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Change how CMake links libc++ with OS X.
AbandonedPublic

Authored by EricWF on Feb 9 2015, 9:57 AM.

Details

Summary

As it stands now CMake will always link against /usr/lib/libc++abi.dylib on OS X; Even when -DLIBCXX_CXX_ABI_PATH is given; Even if we are using libcxxrt as the ABI library.

Furthermore, when LIBCXX_CXX_ABI_PATH is given libc++ will end up linked against two version of libc++abi. This patch, while not pretty, changes it so that CMake will guess the location of libc++abi.dylib and attempt to link libc++ against only the version of libc++abi.dylib it has guessed.

Note: We cannot actually ensure that the libc++abi.dylib that we guessed actually exists at configure time (because it may be created between configuring and building).

Any suggestions on cleaning this up is greatly appreciated.

Diff Detail

Event Timeline

EricWF updated this revision to Diff 19594.Feb 9 2015, 9:57 AM
EricWF retitled this revision from to [libc++] Change how CMake links libc++ with OS X..
EricWF updated this object.
EricWF edited the test plan for this revision. (Show Details)
EricWF added reviewers: danalbert, jroelofs, mclow.lists.
EricWF added a subscriber: Unknown Object (MLST).
EricWF updated this revision to Diff 19600.Feb 9 2015, 10:50 AM

Remove the '-rpath' switch when LIBCXX_CXX_ABI_LIBRARY_PATH is defined.

EricWF abandoned this revision.Aug 16 2016, 2:16 AM

Abandoning