summaryrefslogtreecommitdiffstats
path: root/libcxx/cmake/Modules
Commit message (Collapse)AuthorAgeFilesLines
...
* Print message when configuring for standalone build.Eric Fiselier2015-07-311-0/+1
| | | | llvm-svn: 243737
* Reapply working parts of CMake cleanup.Eric Fiselier2015-07-303-0/+257
| | | | | | | This patch adds the working parts of r243503. The difference with this patch is that it doesn't include the HandleLLVMOptions.cmake file. llvm-svn: 243698
* Revert recent CMake changes again due to failing compiler-rt buildsEric Fiselier2015-07-293-242/+0
| | | | llvm-svn: 243593
* Attempt to fix build issues introduced by Eric Fiselier2015-07-291-24/+23
| | | | | | r243574 llvm-svn: 243591
* Recommit r243503 "[libcxx] Cleanup CMake configuration and integrate with LLVM"Eric Fiselier2015-07-293-0/+243
| | | | | | | | | This change was reverted in r243550 because it broke clang-format builds (see PR24306). This patch recommits a fixed version of the original. llvm-svn: 243574
* Revert r243503 "[libcxx] Cleanup CMake configuration and integrate with LLVM"Hans Wennborg2015-07-293-241/+0
| | | | | | This caused clang-format to stop linking on Mac; see PR24306. llvm-svn: 243550
* [libcxx] Cleanup CMake configuration and integrate with LLVMEric Fiselier2015-07-293-0/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch contains the following changes: 1. Require that libc++ can find a LLVM source directory. This is done the same way as `libc++abi` currently does. 2. Cleanup ugly configuration code in CMakeLists.txt by using `add_flags`, `add_flags_if`, and `add_flags_if_supported` macros. The goals for this patch are: 1. Help libc++ be more consistent with how LLVM handles CMake options (see PR23670 PR23671). 2. Make it easier to use sanitizers using the `LLVM_USE_SANITIZER` option. 3. Make libc++'s CMakeLists.txt file easier to understand and change. 4. Move towards allowing libc++ to create Sphinx documentation (see http://efcs.ca/libcxx-docs). 5. Move towards allowing libc++ to use other LLVM utilities such as `not` and `FileCheck`. Reviewers: mclow.lists, jroelofs, danalbert Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11308 llvm-svn: 243503
* Fix building and testing libc++ with GCC.Eric Fiselier2015-05-201-1/+1
| | | | | | | | | | | | | | | | The changes in src/exception.cpp and cmake/Modules/HandleLibCXXABI.cmake fix a bug when building libc++ with GCC. Because GCC does not support __has_include we need to explicitly tell it that we are building against libc++abi via the preprocessor definition `LIBCXX_BUILDING_LIBCXXABI`. The changes in include/ratio are to work around CWG defect 1712 (constexpr variable template declarations). GCC 4.8 and before has not adopted the resolution to this defect. The changes in include/exception work around an issue where is_final is used without it being defined in type_traits. llvm-svn: 237767
* [libcxx] Add code coverage configuration to CMake and LIT.Eric Fiselier2015-03-311-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds configuration to CMake and LIT for running the libc++ test-suite to generate code coverage. To use code coverage use following instructions. * Find the clang resource dir using `$CXX -print-search-dirs`. Let <library-dir> be the first library search directory. * `cmake <regular-options> -DLIBCXX_GENERATE_COVERAGE=ON -DLIBCXX_COVERAGE_LIBRARY=<library-dir>/lib/<platform>/libclang_rt.profile.a <source>` * `make cxx` * `make check-libcxx` * `make generate-libcxx-coverage` The reason I want this patch upstreamed is so I can setup a bot that generates code coverage and posts in online for every revision. Reviewers: mclow.lists, jroelofs, danalbert Reviewed By: danalbert Differential Revision: http://reviews.llvm.org/D8716 llvm-svn: 233669
* [libcxx] Unify LIBCXX_<ABI-Name>_INCLUDE_PATHS to be ↵Eric Fiselier2015-03-191-6/+6
| | | | | | | | | | | | | | | | | | | | | | LIBCXX_CXX_ABI_INCLUDE_PATHS Summary: Clean up all the different possible CMake options for specifying the ABI include paths into one CMake option named `LIBCXX_CXX_ABI_INCLUDE_PATHS`. The documentation has been updated to reflect this change. For the next week I have added explicit errors if any of the old flags is used. These errors inform users of the change and the new option to use. Before committing the change I will announce this change on cfe-dev. Reviewers: danalbert, mclow.lists Reviewed By: danalbert, mclow.lists Subscribers: jroelofs, cbergstrom, cfe-commits Differential Revision: http://reviews.llvm.org/D5039 llvm-svn: 232762
* [libcxx] Add support for linking libc++ against a static ABI library.Eric Fiselier2015-03-031-1/+5
| | | | | | | | | | | | | | | | Summary: This patch add the CMake option `LIBCXX_ENABLE_STATIC_ABI_LIBRARY` which, when enabled, will link libc++ against the static version of the ABI library. Reviewers: mclow.lists, jroelofs, danalbert Reviewed By: danalbert Subscribers: compnerd, cfe-commits Differential Revision: http://reviews.llvm.org/D8017 llvm-svn: 231076
* [libcxx] Move to using libc++abi2.exp as the default symbol list for libc++Eric Fiselier2015-02-211-0/+1
| | | | | | | | | | | | | | | | | | | | Summary: libc++abi2.exp should be used whenever `cxxabi.h` defines `_LIBCPPABI_VERSION`. This macro was added to libc++abi in 2012 in r149632. For this reason we should use libc++abi2.exp as default unless otherwise specified. Also when building against an in-tree libc++abi we definitely want to use libc++abi2.exp. I would love to know what OSX was the last to use libc++abi.exp but I can only test on 10.9. Reviewers: danalbert, mclow.lists, EricWF Reviewed By: EricWF Subscribers: meadori, cfe-commits Differential Revision: http://reviews.llvm.org/D7773 llvm-svn: 230119
* Make ABI header not found a warning, not an error.Dan Albert2015-02-101-1/+1
| | | | | | | | | | Since we've added a new header to libc++abi (__cxxabi_config.h), we now have a case where we might not always find all the ABI headers: building libc++ against the system's libc++abi on Darwin. Since this isn't actually a fatal error, degrade it to a warning. llvm-svn: 228720
* Add __cxxabi_config.h to libcxxabi headers.Dan Albert2015-02-051-2/+2
| | | | llvm-svn: 228364
* Remove triple detection from cmake.Dan Albert2015-01-161-53/+0
| | | | | | | | This isn't actually used for anything, and is broken on Darwin (currently causing build failures now that the triple is passed to aid cross compiling). Rather than fix unused code, just remove it. llvm-svn: 226243
* Fix build regression caused by not defining ABI library macrosEric Fiselier2014-11-151-1/+1
| | | | llvm-svn: 222085
* [libcxx] Redo adding support for building and testing with an ABI library ↵Eric Fiselier2014-10-191-23/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add special case for finding the in-tree ABI library.Eric Fiselier2014-10-181-6/+13
| | | | | | | | When libcxx is built in-tree with libcxxabi it links against libcxxabi using the name of the cmake target and not the actual library name. The cmake target will not work with `find_library()`, so it needs special case handling. llvm-svn: 220121
* [libcxx] Add support for building and testing with an ABI library not along ↵Eric Fiselier2014-10-181-0/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | linker paths Summary: 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`. Reviewers: mclow.lists, danalbert, EricWF Reviewed By: EricWF Subscribers: emaste, cfe-commits Differential Revision: http://reviews.llvm.org/D5038 llvm-svn: 220118
* Add CMake build and fix major Linux blockers.Michael J. Spencer2010-12-102-0/+71
llvm-svn: 121510
OpenPOWER on IntegriCloud