[libcxx] Redo adding support for building and testing with an ABI library not along linker paths
Summary:
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.
Reviewers: mclow.lists, cbergstrom, chandlerc, danalbert
Reviewed By: chandlerc, danalbert
Subscribers: chandlerc, cfe-commits
Differential Revision: http://reviews.llvm.org/D5860
llvm-svn: 220157
diff --git a/libcxx/www/index.html b/libcxx/www/index.html
index b9bb1f8..8e1c074 100644
--- a/libcxx/www/index.html
+++ b/libcxx/www/index.html
@@ -448,7 +448,8 @@
Normally you must link libc++ against a ABI shared library that the
linker can find. If you want to build and test libc++ against an ABI
library not in the linker's path you need to set
- <code>-DCMAKE_LIBRARY_PATH=/path/to/abi/lib</code> when configuring CMake.
+ <code>-DLIBCXX_CXX_ABI_LIBRARY_PATH=/path/to/abi/lib</code> when
+ configuring CMake.
</p>
<p>
An example build using libc++abi would look like:
@@ -456,7 +457,7 @@
<li><code>CC=clang CXX=clang++ cmake
-DLIBCXX_CXX_ABI=libc++abi
-DLIBCXX_LIBCXXABI_INCLUDE_PATHS="/path/to/libcxxabi/include"
- -DCMAKE_LIBRARY_PATH="/path/to/libcxxabi-build/lib"
+ -DLIBCXX_CXX_ABI_LIBRARY_PATH="/path/to/libcxxabi-build/lib"
path/to/libcxx</code></li>
<li><code>make</code></li>
</ul>