Commit Graph

15 Commits

Author SHA1 Message Date
Eric Fiselier a63c149ceb [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
2014-10-19 00:42:41 +00:00
Hans Wennborg 4714826262 [libc++] Fix the CMake build on Mac when setting MACOSX_DEPLOYMENT_TARGET=10.6
The build file was trying to use LIBCXX_VERSION, which isn't set
anywhere, and also forgot to split the 'compile_flags' list.

Differential Revision: http://reviews.llvm.org/D4860

llvm-svn: 215463
2014-08-12 17:32:07 +00:00
Dan Albert b9dbbba6cb Obey LLVM_LIBDIR_SUFFIX.
llvm-svn: 214726
2014-08-04 16:13:32 +00:00
David Fang ed7987dcfe eliminate install of duplicate headers (take 2)
Patch by Ryuta Suzuki

llvm-svn: 211629
2014-06-24 20:32:11 +00:00
Howard Hinnant 6a0d6cea40 Justin Bogner: This makes the headers available in the build directory, making it
easier to use freshly-built clang with freshly-built libc++.

Basically, this makes it possible to run clang with libc++ without
having to install it, even if you don't have any version of libc++
installed in /usr/

llvm-svn: 194825
2013-11-15 17:18:57 +00:00
Michael Gottesman b422ecc7de [cmake] Provide an option to not install the support headers so that the cmake build can match the make build if requested.
llvm-svn: 189739
2013-09-02 07:28:05 +00:00
Michael Gottesman 05c4b550c9 [cmake] Make libcxx standalone compile on Mac OS X.
llvm-svn: 189738
2013-09-02 07:28:03 +00:00
Michael J. Spencer bb8cfd0fec [CMake] Fix c++ abi library configuration on Linux.
You can now configure from the command line using:
-DLIBCXX_CXX_ABI=libsupc++
-DLIBCXX_LIBSUPCXX_INCLUDE_PATHS="path;path

Also documents how to build on Linux.

llvm-svn: 171316
2012-12-31 19:34:21 +00:00
Michael J. Spencer 299fc29a59 [CMake] Add support for selecting which c++ abi library to use.
llvm-svn: 169036
2012-11-30 21:02:29 +00:00
Howard Hinnant b2f52bb982 Allow libc++ to be built with CMake from within the LLVM tree. The libc++ part is just some renaming as the variable was already in use, conflicting with something else in the LLVM tree. Contributed by Ruben Van Boxem.
llvm-svn: 153036
2012-03-19 15:40:23 +00:00
Howard Hinnant 3c78ca07bc Partial Windows port by Ruben Van Boxem
llvm-svn: 140328
2011-09-22 19:10:18 +00:00
Howard Hinnant cf76200bd3 http://llvm.org/bugs/show_bug.cgi?id=9399 fixed by Ryuta Suzuki
llvm-svn: 131961
2011-05-24 12:54:00 +00:00
Howard Hinnant 3145a948d6 http://llvm.org/bugs/show_bug.cgi?id=9349 I introduced a bug with the last fix and Ryuta Suzuki has corrected it. And hopefully I committed Ryuta Suzuki's directions correctly this time.
llvm-svn: 126917
2011-03-03 01:59:23 +00:00
Howard Hinnant 01533ed9ad http://llvm.org/bugs/show_bug.cgi?id=9349 I have not personally tested this patch. Please let me know if it causes problems.
llvm-svn: 126846
2011-03-02 17:29:46 +00:00
Michael J. Spencer f5799be4a8 Add CMake build and fix major Linux blockers.
llvm-svn: 121510
2010-12-10 19:47:54 +00:00