summaryrefslogtreecommitdiffstats
path: root/libcxx/cmake/Modules/HandleLibcxxFlags.cmake
Commit message (Collapse)AuthorAgeFilesLines
* [libc++][CMake] Refactor how we link against system librariesLouis Dionne2019-04-301-0/+24
| | | | | | | | | | | | | | | | | Summary: Instead of populating the global LIBCXX_LIBRARIES, we use the link-time dependency management built into CMake to propagate link flags. This leads to a cleaner and easier-to-follow build. Reviewers: phosek, smeenai, EricWF Subscribers: mgorny, christof, jkorous, dexonsmith, jfb, mstorsjo, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D60969 llvm-svn: 359571
* [CMake] Split linked libraries for shared and static libc++Petr Hosek2019-04-171-8/+0
| | | | | | | | | | | | | Some linker libraries are only needed for shared libc++, some only for static libc++, combining these together in LIBCXX_LIBRARIES and LIBCXX_INTERFACE_LIBRARIES can introduce unnecessary dependencies. This changes splits those up into LIBCXX_SHARED_LIBRARIES and LIBCXX_STATIC_LIBRARIES matching what libc++abi already does. Differential Revision: https://reviews.llvm.org/D57872 llvm-svn: 358614
* Add cxx-benchmark-unittests targetEric Fiselier2018-11-131-0/+23
| | | | | | | | | | | | | This patch adds the cxx-benchmark-unittests target so we can start getting test coverage on the benchmarks, including building with sanitizers. Because we're only looking for test-coverage, the benchmarks run for the shortest time possible, and in parallel. The target is excluded from all by default. It only builds and runs the libcxx configurations of the benchmarks, and not any versions built against the systems native standard library. llvm-svn: 346811
* Attempt to unbreak Windows configuration.Eric Fiselier2018-10-011-0/+1
| | | | | | | | | | | Although libc++ doesn't yet support Windows we still have Windows builders to track our progress. Currently the clang-cl configuration seems broken because it doesn't support -std=c++11 and instead requires /std:c++11. This patch attempts to fix this. llvm-svn: 343431
* Fix copy-paste errors in r292001Eric Fiselier2017-01-141-3/+3
| | | | llvm-svn: 292010
* [libc++] [CMake] Link with /nodefaultlibs on WindowsEric Fiselier2017-01-141-0/+4
| | | | | | | | | | | | | | | | Summary: This patch attempts to fix the libc++ build/link so that it doesn't use an default C++ libraries on Windows. This is needed to prevent linking to MSVC's STL library. Additionally this patch changes libc++ so that it is always linked with the non-debug DLL's (e.g. `/MD`). This is needed so that the test suite can correctly link the same libraries without needing to know which configuration `c++.dll` was linked with. Reviewers: compnerd, rnk, majnemer, kimgr, awson, halyavin, smeenai Subscribers: cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D28441 llvm-svn: 292001
* Fix linker script generation for in-tree buildsEric Fiselier2016-10-091-0/+8
| | | | llvm-svn: 283700
* [libcxx] Allow target flags to affect CMake configuration testsEric Fiselier2016-06-021-0/+20
| | | | | | | | | | | | | | | | | | Summary: This patch changes the libc++ CMake so that it adds certain target flags like '-m32' or '--gcc-toolchain' before including config-ix.cmake. Since these flags can affect things like check_library_exists([...]) they needed to be added before the tests are performed. This patch fixes: https://llvm.org/bugs/show_bug.cgi?id=24322 Reviewers: danalbert, jroelofs, bcraig, compnerd Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20887 llvm-svn: 271460
* [libcxx] Prefer C++14 over C++11 when building libc++experimental.Eric Fiselier2016-05-101-0/+5
| | | | | | | | | | | | | | | | | | Summary: Currently libc++experimental builds with C++11. This patch changes that to C++14 when supported by the compiler. Although nothing currently requires C++14 the upcoming <experimental/memory_resource> implementation would benefit from it. [1] Note that libc++.so continues to build with C++11 and is unaffected by this change. [1] <experimental/memory_resource> provides global resources which must exist for the entire lifetime of the program. In order to ensure that a global resource can be used during program termination there destructors must never be invoked. The only way to do this, while also allowing "constant initialization", is to use a C++14 union. Reviewers: mclow.lists Subscribers: pete, cfe-commits Differential Revision: http://reviews.llvm.org/D19992 llvm-svn: 269070
* Use __config_site when building libc++. Also cleanup ABI versioning docEric Fiselier2015-10-141-3/+3
| | | | llvm-svn: 250261
* ABI versioning macros for libc++.Evgeniy Stepanov2015-10-131-0/+6
| | | | | | | | C++ macros and CMake options that specify the default ABI version of the library, and can be overridden to pick up new ABI-changing features. llvm-svn: 250254
* [libcxx] Capture configuration information when installing the libc++ headersEric Fiselier2015-10-131-0/+16
| | | | | | | | | | | | | | | | | Summary: Hi all, This patch is a successor to D11963. However it has changed dramatically and I felt it would be best to start a new review thread. Please read the design documentation added in this patch for a description of how it works. Reviewers: mclow.lists, danalbert, jroelofs, EricWF Subscribers: vkalintiris, rnk, ed, espositofulvio, asl, eugenis, cfe-commits Differential Revision: http://reviews.llvm.org/D13407 llvm-svn: 250235
* Remove -Werror when using check_cxx_compiler_flag because it was causing ↵Eric Fiselier2015-07-311-1/+1
| | | | | | compiler-rt breakages. llvm-svn: 243784
* Reapply working parts of CMake cleanup.Eric Fiselier2015-07-301-0/+147
| | | | | | | 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-291-147/+0
| | | | llvm-svn: 243593
* Recommit r243503 "[libcxx] Cleanup CMake configuration and integrate with LLVM"Eric Fiselier2015-07-291-0/+147
| | | | | | | | | 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-291-147/+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-291-0/+147
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
OpenPOWER on IntegriCloud