summaryrefslogtreecommitdiffstats
path: root/libcxx/include/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* [NFC] Fix typos in CMake commentLouis Dionne2019-10-211-2/+2
| | | | llvm-svn: 375469
* [libc++] Take 2: Integrate the PSTL into libc++Louis Dionne2019-08-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This commit allows specifying LIBCXX_ENABLE_PARALLEL_ALGORITHMS when configuring libc++ in CMake. When that option is enabled, libc++ will assume that the PSTL can be found somewhere on the CMake module path, and it will provide the C++17 parallel algorithms based on the PSTL (that is assumed to be available). The commit also adds support for running the PSTL tests as part of the libc++ test suite. The first attempt to commit this failed because it exposed a bug in the tests for modules. Now that this has been fixed, it should be safe to commit this. Reviewers: EricWF Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits, mclow.lists, EricWF Tags: #libc Differential Revision: https://reviews.llvm.org/D60480 llvm-svn: 367903
* Revert "[libc++] Integrate the PSTL into libc++"Louis Dionne2019-07-191-1/+0
| | | | | | | This reverts r366593, which caused unforeseen breakage on the build bots. I'm reverting until the problems have been figured out and fixed. llvm-svn: 366603
* [libc++] Integrate the PSTL into libc++Louis Dionne2019-07-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | Summary: This commit allows specifying LIBCXX_ENABLE_PARALLEL_ALGORITHMS when configuring libc++ in CMake. When that option is enabled, libc++ will assume that the PSTL can be found somewhere on the CMake module path, and it will provide the C++17 parallel algorithms based on the PSTL (that is assumed to be available). The commit also adds support for running the PSTL tests as part of the libc++ test suite. Reviewers: rodgert, EricWF Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits, mclow.lists, EricWF Tags: #libc Differential Revision: https://reviews.llvm.org/D60480 llvm-svn: 366593
* [libcxx] Slightly improved policy for handling experimental featuresLouis Dionne2019-06-111-8/+0
| | | | | | | | | | | | | | | | | | | | Summary: Following the discussion on the libcxx-dev mailing list (http://lists.llvm.org/pipermail/libcxx-dev/2019-May/000358.html), this implements the new policy for handling experimental features and their deprecation. We basically add a deprecation warning for std::experimental::filesystem, and we remove a bunch of <experimental/*> headers that were now empty. Reviewers: mclow.lists, EricWF Subscribers: mgorny, christof, jkorous, dexonsmith, arphaman, libcxx-commits, jfb Tags: #libc Differential Revision: https://reviews.llvm.org/D62428 llvm-svn: 363072
* [CMake] Copy C++ headers before configuring runtimes buildChris Bieneman2019-05-231-11/+19
| | | | | | | | | | | | | | | | Summary: On some platforms C++ headers are packaged with the compiler not the sysroot. If you don't copy C++ headers into the build include directory during configuraiton of the outer build the C++ check during the runtime configuration may get inaccurate results. Reviewers: phosek, compnerd, smeenai, EricWF Reviewed By: compnerd Subscribers: EricWF, christof, libcxx-commits, mgorny, llvm-commits Tags: #llvm, #libc Differential Revision: https://reviews.llvm.org/D62155 llvm-svn: 361513
* Revert "[coroutines] Add std::experimental::task<T> type"Brian Gesiak2019-03-261-1/+0
| | | | | | | | This revision is causing build and test failures, such as http://lab.llvm.org:8011/builders/libcxx-libcxxabi-libunwind-armv8-linux/builds/648/steps/test.libcxx/logs/stdio, so I'll revert it. llvm-svn: 357023
* [coroutines] Add std::experimental::task<T> typeBrian Gesiak2019-03-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Adds the coroutine `std::experimental::task<T>` type described in proposal P1056R0. See https://wg21.link/P1056R0. This implementation allows customization of the allocator used to allocate the coroutine frame by passing std::allocator_arg as the first argument, followed by the allocator to use. This supports co_awaiting the same task multiple times. The second and subsequent times it returns a reference to the already-computed value. This diff also adds some implementations of other utilities that have potential for standardization as helpers within the test/... area: - `sync_wait(awaitable)` - See P1171R0 - `manual_reset_event` Move the definition of the __aligned_allocation_size helper function from <experimental/memory_resource> to <experimental/__memory> so it can be more widely used without pulling in memory_resource. Outstanding work: - Use C++14 keywords directly rather than macro versions eg. use `noexcept` instead of `_NOEXCEPT`). - Add support for overaligned coroutine frames. This may need wording in the Coroutines TS to support passing the extra `std::align_val_t`. - Eliminate use of `if constexpr` if we want it to compile under C++14. Patch by @lewissbaker (Lewis Baker). llvm-svn: 357010
* [libc++] Remove empty header xlocale/xlocale.hLouis Dionne2019-03-111-1/+0
| | | | | | | | | | | | | | Summary: I can't think of a reason for shipping this empty header. If there is a reason to do so, then hopefully this review can uncover it. Reviewers: mclow.lists, EricWF Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D59137 llvm-svn: 355829
* Add fenv.h headerEric Fiselier2019-02-111-0/+1
| | | | | | | | | | | | | | | | | Summary: Some implementations of fenv.h use macros to define the functions they provide. This can cause problems when `std::fegetround()` is spelled in source. This patch adds a `fenv.h` header to libc++ for the sole purpose of turning those macros into real functions. Reviewers: rsmith, mclow.lists, ldionne Reviewed By: rsmith Subscribers: mgorny, christof, libcxx-commits Differential Revision: https://reviews.llvm.org/D57729 llvm-svn: 353767
* [libcxx] Remove dynarrayLouis Dionne2018-11-281-1/+0
| | | | | | | | | | | | | | Summary: std::dynarray had been proposed for C++14, but it was pulled out from C++14 and there are no plans to standardize it anymore. Reviewers: mclow.lists, EricWF Subscribers: mgorny, christof, jkorous, dexonsmith, arphaman, libcxx-commits Differential Revision: https://reviews.llvm.org/D54801 llvm-svn: 347783
* Recommit r339943 - Establish the <bit> header. NFC yet. Reviewed as ↵Marshall Clow2018-08-171-0/+1
| | | | | | https://reviews.llvm.org/D50815 - with a fix for the sanitizer bots llvm-svn: 340045
* [libc++][C++17] Elementary string conversions for integral typesZhihao Yuan2018-08-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Major QoI considerations: - The facility is backported to C++14, same as libstdc++. - Efforts have been made to minimize the header dependencies. - The design is friendly to the uses of MSVC intrinsics (`__emulu`, `_umul128`, `_BitScanForward`, `_BitScanForward64`) but not implemented; future contributions are welcome. Thanks to Milo Yip for contributing the implementation of `__u64toa` and `__u32toa`. References: https://wg21.link/p0067r5 https://wg21.link/p0682r1 Reviewers: mclow.lists, EricWF Reviewed By: mclow.lists Subscribers: ldionne, Quuxplusone, christof, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D41458 llvm-svn: 338479
* First half of C++17's splicing maps and setsErik Pilkington2018-08-011-0/+1
| | | | | | | | | | | | | This commit adds a node handle type, (located in __node_handle), and adds extract() and insert() members to all map and set types, as well as their implementations in __tree and __hash_table. The second half of this feature is adding merge() members, which splice nodes in bulk from one container into another. This will be committed in a follow-up. Differential revision: https://reviews.llvm.org/D46845 llvm-svn: 338472
* Attempt to unbreak *all the bots*Eric Fiselier2018-07-271-0/+1
| | | | | | | | The bots were failing to build the cxx_filesystem target, so the tests were failing. Though this does lead me to wonder how it was ever working with c++experimental. llvm-svn: 338095
* [CMake] Don't install c++abi headers in standalone libc++ buildPetr Hosek2018-07-251-1/+1
| | | | | | | | | | | This is a refinement on r337833. Previously we were installing two copies of c++abi headers in libc++ build directory, one in include/c++build and another one in include/c++/v1. However, the second copy is unnecessary when building libc++ standalone. Differential Revision: https://reviews.llvm.org/D49752 llvm-svn: 337979
* Implement <span>. Reviewed as https://reviews.llvm.org/D49338Marshall Clow2018-07-241-0/+1
| | | | llvm-svn: 337804
* [CMake] Use correct variable as header install prefixPetr Hosek2018-07-151-2/+2
| | | | | | | | | | This variable is already set in CMakeLists.txt but it wasn't used which means that the headers get installed into a wrong location when the per target runtime directory option is being used. Differential Revision: https://reviews.llvm.org/D49345 llvm-svn: 337118
* [libc++] Install the missing header __errcZhihao Yuan2018-07-031-0/+1
| | | | | | | | | | | | Summary: Omitted from D41347. Reviewers: EricWF Subscribers: mgorny, christof, ldionne, cfe-commits Differential Revision: https://reviews.llvm.org/D48864 llvm-svn: 336165
* [CMake] Rename cxx_headers back to cxx-headers.Ahmed Bougacha2018-06-281-4/+4
| | | | | | | | | | | | | | r334477 renamed the cxx-headers target to cxx_headers, but various pieces sort-of expect the target names to match the component (e.g., LLVM_DISTRIBUTION_COMPONENTS in the various bootstrap caches, which, via some magic foreign to me, seems to expect cxx-headers, install-cxx-headers, and install-cxx-headers-stripped to exist.) Revert back to cxx-headers. Differential Revision: https://reviews.llvm.org/D48701 llvm-svn: 335899
* Support for multiarch runtimes layoutPetr Hosek2018-06-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This change adds a support for multiarch style runtimes layout, so in addition to the existing layout where runtimes get installed to: lib/clang/$version/lib/$os Clang now allows runtimes to be installed to: lib/clang/$version/$target/lib This also includes libc++, libc++abi and libunwind; today those are assumed to be in Clang library directory built for host, with the new layout it is possible to install libc++, libc++abi and libunwind into the runtime directory built for different targets. The use of new layout is enabled by setting the LLVM_ENABLE_RUNTIME_TARGET_DIR CMake variable and is supported by both projects and runtimes layouts. The runtimes CMake build has been further modified to use the new layout when building runtimes for multiple targets. Differential Revision: https://reviews.llvm.org/D45604 llvm-svn: 335809
* [CMake] Fix install-cxx target.Matt Morehouse2018-06-251-1/+1
| | | | | | Was broken by r334477. llvm-svn: 335507
* [CMake] Use common variable for all header targets NFCPetr Hosek2018-06-121-3/+3
| | | | | | This simplifies the handling of header targets. llvm-svn: 334477
* Reland "Use custom command and target to install libc++ headers"Petr Hosek2018-06-121-32/+220
| | | | | | | | | | | | | | | | | | | Using file(COPY FILE...) has several downsides. Since the file command is only executed at configuration time, any changes to headers made after the initial CMake execution are ignored. This can lead to subtle errors since the just built Clang will be using stale libc++ headers. Furthermore, since the headers are copied prior to executing the build system, this may hide missing dependencies on libc++ from other LLVM components. This changes replaces the use of file(COPY FILE...) command with a custom command and target which addresses all aforementioned issues and matches the implementation already used by other LLVM components that also install headers like Clang builtin headers. Differential Revision: https://reviews.llvm.org/D44773 llvm-svn: 334468
* Revert "[CMake] Use custom command and target to install libc++ headers"Petr Hosek2018-04-091-219/+32
| | | | | | This reverts commit r329544 which is failing on libcxx standalone bots. llvm-svn: 329545
* [CMake] Use custom command and target to install libc++ headersPetr Hosek2018-04-091-32/+219
| | | | | | | | | | | | | | | | | | | Using file(COPY FILE...) has several downsides. Since the file command is only executed at configuration time, any changes to headers made after the initial CMake execution are ignored. This can lead to subtle errors since the just built Clang will be using stale libc++ headers. Furthermore, since the headers are copied prior to executing the build system, this may hide missing dependencies on libc++ from other LLVM components. This changes replaces the use of file(COPY FILE...) command with a custom command and target which addresses all aforementioned issues and matches the implementation already used by other LLVM components that also install headers like Clang builtin headers. Differential Revision: https://reviews.llvm.org/D44773 llvm-svn: 329544
* Implement P0768r1: Library support for the Spaceship Operator.Eric Fiselier2018-04-061-1/+0
| | | | | | | | | | | | this patch adds the <compare> header and implements all of it except for [comp.alg]. As I understand it, the header is needed by the compiler in when implementing the semantics of operator<=>. For that reason I feel it's important to land this header early, despite all compilers lacking support. llvm-svn: 329460
* [CMake] Copy the generated __config header into build directoryPetr Hosek2018-03-101-14/+26
| | | | | | | | | | | | | | When the generated __config file is being used, it is currently only copied during installation process. However, that means that the file that gets copied into LLVM build directory is the vanilla __config file, and any parts of the build that depend on the just built toolchain like sanitizers will get that instead of the generated version. To avoid this issue, we need to copy the generated header into the LLVM build directory as well. Differential Revision: https://reviews.llvm.org/D43797 llvm-svn: 327194
* [libc++] Unbreak Apple buildbotsShoaib Meenai2017-12-081-0/+1
| | | | | | | | These buildbots are using the deprecated target name install-libcxx-headers instead of the more up to date install-cxx-headers, so I need to add an install-libcxx-headers-stripped target to satisfy them. llvm-svn: 320201
* [libc++] Create install-stripped targetsShoaib Meenai2017-12-061-0/+2
| | | | | | | | | | | | LLVM is gaining install-*-stripped targets to perform stripped installs, and in order for this to be useful for install-distribution, all potential distribution components should have stripped installation targets. LLVM has a function to create these install targets, but since we can't use LLVM CMake functions in libc++, let's do it manually. Differential Revision: https://reviews.llvm.org/D40680 llvm-svn: 319959
* [libcxx][CMake] Add install path variable to allow overriding the destinationPetr Hosek2017-07-111-2/+2
| | | | | | | | | This is going to be used by the runtime build in the multi-target setup to allow using different install prefix for each target. Differential Revision: https://reviews.llvm.org/D33762 llvm-svn: 307615
* Simplify CMake target for the __generated_config headerEric Fiselier2017-01-031-4/+1
| | | | llvm-svn: 290875
* build: remove now unused UNIX_CATSaleem Abdulrasool2017-01-031-4/+0
| | | | | | | THe previous change replaced the use of `cat` or `type` with a custom python script. Remove the now unused command determining. llvm-svn: 290856
* Fix creating __generated_config on WindowsEric Fiselier2017-01-031-2/+7
| | | | llvm-svn: 290853
* build: differentiate between building for and on WindowsSaleem Abdulrasool2017-01-011-1/+1
| | | | | | | | | This is necessary to support cross-compiling a Windows libc++ from Linux. The CMAKE_SYSTEM_HOST_NAME tells you what, in autotools parlance, is known as the build as opposed to WIN32 which maps to, in autotools parlance, host. llvm-svn: 290800
* [CMake] Fix issue reported on sanitizer botsChris Bieneman2016-12-171-1/+1
| | | | | | This should resolve an issue reported on the commit thread that impacted sanitizer bots. llvm-svn: 290052
* [CMake] Put headers relative to clangChris Bieneman2016-12-161-10/+6
| | | | | | | | When libcxx isn't building with an installed LLVM we copy the libcxx headers into the LLVM build directory so that a clang in that build tree can find the headers relative to itself. This is only important in situations where you don't have headers installed under /, which is common these days on Darwin. llvm-svn: 289963
* Add check-cxx-abilist target when supported.Eric Fiselier2016-11-141-6/+10
| | | | | | | | | | | | | This patch adds a `check-cxx-abilist` target which verifies the libc++.so ABI when the current build configuration matches the configuration used to generate the ABI lists. In order to make this change `HandleOutOfTreeLLVM.cmake` needed to be modified to include `LLVMConfig.cmake` so that `TARGET_TRIPLE` is defined. Hopefully the changes needed to accommodate this won't break existing build configurations. llvm-svn: 286789
* [CMake] NFC. Fixing spelling from r280400Chris Bieneman2016-09-011-1/+1
| | | | | | Doh! llvm-svn: 280406
* [CMake] Don't copy headers on fully standaloneChris Bieneman2016-09-011-1/+1
| | | | | | | | In r280108 I tried to make the headers copy relative to LLVM_BINARY_DIR, and the intent was that it would only happen on in-tree builds or runtimes directory builds. It didn't actually work that way. This patch adds a check for CMAKE_SOURCE_DIR being equal to CMAKE_CURRENT_SOURCE_DIR. In this case we set a variable LIBCXX_USING_INSTLLED_LLVM. This doesn't necessarily mean the LLVM is installed (it could be a build directory), but it means we need to treat the LLVM directory as read-only. llvm-svn: 280400
* [CMake] Copy headers relative to LLVM_BINARY_DIRChris Bieneman2016-08-301-5/+7
| | | | | | | | | | | | Summary: This copy phase is only needed for in-tree builds, so we should be copying to the LLVM build directory's include dir instead of the sub-project include dir. Reviewers: bogner, EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24015 llvm-svn: 280108
* [CMake] Be more consistent about naming targets and componentsChris Bieneman2016-08-241-6/+9
| | | | | | | | | | | | | | | Summary: The point of this patch is to have a consistent convention for naming build, check and install targets so that the targets can be constructed from the project name. This change renames a bunch of CMake components and targets from libcxx to cxx. For each renamed target I've added a convenience target that matches the old target name and depends on the new target. This will preserve function of the old targets so that the change doesn't break the world. We can evaluate if it is worth removing the extra targets later. Reviewers: EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D23699 llvm-svn: 279675
* Fix PR27751. Add proper dependancies for install-libcxx-headers ruleEric Fiselier2016-05-271-1/+2
| | | | llvm-svn: 271073
* [CMake] Fix a copy-paste errorChris Bieneman2016-05-031-1/+1
| | | | | | Based on post commit feedback from Eric Fiselier. llvm-svn: 268401
* [CMake] Create a separate install target for libcxx headersChris Bieneman2016-04-291-2/+12
| | | | | | This change doesn't impact the behavior of the install-libcxx target which installs whichever libcxx components you build, it just adds a separate target to just install the headers. llvm-svn: 268124
* [libcxx] Capture configuration information when installing the libc++ headersEric Fiselier2015-10-131-0/+27
| | | | | | | | | | | | | | | | | 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
* [libcxx] Add "install-libcxx" target.Eric Fiselier2015-08-191-0/+1
| | | | | | | | | | | | Summary: Currently you can't install libc++ from within the LLVM tree without installing all of LLVM. This patch adds an install rule for libc++. Reviewers: mclow.lists, danalbert, jroelofs, EricWF Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11697 llvm-svn: 245470
* Add option to turn off installation of headers.Eric Fiselier2014-12-121-5/+7
| | | | llvm-svn: 224162
* Make headers available in the build directoryJustin Bogner2014-10-231-4/+13
| | | | | | | | | | This essentially re-does r194825 and 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/. This behaviour broke in r210577/r211629, which fixed pr18681. llvm-svn: 220489
* eliminate install of duplicate headers (take 2)David Fang2014-06-241-6/+3
| | | | | | Patch by Ryuta Suzuki llvm-svn: 211629
OpenPOWER on IntegriCloud