[PATCH] [libcxx] Add support for building and testing with an ABI library not along linker paths

Eric Fiselier eric at efcs.ca
Fri Aug 22 21:34:27 PDT 2014


Hi mclow.lists, danalbert,

This patch adds support for building/testing libc++ with an ABI library that the linker would not normally find.

- `CMAKE_LIBRARY_PATH` is used to specify the list of search directories.
- The ABI library is now found using `find_library` instead of assuming its along the linker's search path.
- `CMAKE_LIBRARY_PATH` is passed to our LIT config as `library_paths`.
- For each path in `library_paths` the following flags are added `-L<path> -Wl,-rpath -Wl,<path>`

Some changes in existing behavior were also added:
- `target_link_libraries` is now passed the ABI library file instead of the library name. Ex `target_link_libraries(cxx "/usr/lib/libc++abi.so")` vs `target_link_libraries(cxx "c++abi")`.
- `-Wl,-rpath -Wl,<path>` is now used on OSX to link to libc++ instead of env['DYLD_LIBRARY_PATH'] if `use_system_lib=False`.

http://reviews.llvm.org/D5038

Files:
  CMakeLists.txt
  cmake/HandleLibCXXABI.cmake
  cmake/config-ix.cmake
  lib/CMakeLists.txt
  test/lit.cfg
  test/lit.site.cfg.in
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5038.12876.patch
Type: text/x-patch
Size: 13313 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140823/c0e9eaff/attachment.bin>


More information about the cfe-commits mailing list