[PATCH] [libcxx] Redo adding support for building and testing with an ABI library not along linker paths
Eric Fiselier
eric at efcs.ca
Sat Oct 18 17:11:40 PDT 2014
Hi mclow.lists, danalbert, cbergstrom,
This is the second attempt at allowing for the use of libraries that the linker cannot find. The first attempt used `CMAKE_LIBRARY_PATH` and `find_library` to select which ABI library should be used. There were a number of problems with this approach:
- `find_library` didn't work with cmake targets (ie in-tree libcxxabi build)
- It wasn't always possible to determine where `find_library` actually found your library.
- `target_link_libraries` inserted the path of the ABI library into libc++'s RPATH when `find_library` was used.
- Linking libc++ and it's ABI library is a special case. It's a lot easier to keep it simple.
After discussion with @cbergstrum a new approach was decided upon.
This patch achieve the same ends by simply using `LIBCXX_CXX_ABI_LIBRARY_PATH` to specify where to find the library (if the linker won't find it). When this variable is defined it is simply added as a library search path when linking libc++. It is a lot easier to duplicate this behavior in LIT. It also prevents libc++ from being linked with an RPATH.
http://reviews.llvm.org/D5860
Files:
cmake/Modules/HandleLibCXXABI.cmake
lib/CMakeLists.txt
test/lit.cfg
test/lit.site.cfg.in
www/index.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5860.15124.patch
Type: text/x-patch
Size: 5759 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141019/11fbb000/attachment.bin>
More information about the cfe-commits
mailing list