summaryrefslogtreecommitdiffstats
path: root/libcxx/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* Bump version to 10.0.1Tom Stellard2020-04-131-1/+1
|
* Drop git version suffixAaron Puchert2020-02-171-1/+1
| | | | | | | | | | | | | | Summary: Also fix the version for libcxxabi, which was stuck in the past. Reviewers: hans, mclow.lists Reviewed By: hans Subscribers: mgorny, christof, libcxx-commits, llvm-commits, ldionne Tags: #libc, #llvm Differential Revision: https://reviews.llvm.org/D74586
* [libc++] Require C++14 in all cases.Eric Fiselier2019-12-111-13/+7
| | | | | | | | | LLVM has moved to C++14, and the libc++ build should too. C++14 is needed to provide constant initialization for certain global objects. I suspect this change may break some older GCC buildbots, and I'll clean those up as they fall.
* [libcxx{,abi}] Emit deplibs only when detected by CMakeMichał Górny2019-12-021-1/+6
| | | | | | | | This is a followup to 35bc5276ca3. It fixes the dependent libs usage in libcxx and libcxxabi to link pthread and rt libraries only if CMake detects them, rather than based on explicit platform blacklist. Differential Revision: https://reviews.llvm.org/D70888
* [libc++] Separate -include and path to the site config fileLouis Dionne2019-11-181-1/+1
| | | | | | | | This apparently breaks weird use cases where the build directory is on a separate drive. Someone reported that failure to me privately. I can't remember of a reason for collating the two arguments in the first place, so I don't think this should break anything.
* change LLVM_VERSION_SUFFIX default from svn to gitNick Desaulniers2019-11-111-1/+1
| | | | | | | | | | | | | | | | | Summary: Sayonara SVN! Signed-off-by: Nick Desaulniers <ndesaulniers@google.com> Reviewers: tstellar, jyknight, lebedev.ri, smeenai, mgorny, hans, mclow.lists Reviewed By: mgorny, hans Subscribers: christof, libcxx-commits, llvm-commits, srhines Tags: #libc, #llvm Differential Revision: https://reviews.llvm.org/D70019
* build: avoid custom handling for C++ standardSaleem Abdulrasol2019-11-021-14/+11
| | | | | | Use the builtin CMake support for specifying the proper flags for the targets to build at a certain C++ standard. This avoids unnecessary checks in CMake, speeding up the configure phase as well as simplifies the logic overall.
* [libc++] Force the ABI namespace to be a reserved identifierLouis Dionne2019-10-291-1/+1
| | | | | | | | | | | | | | | | Summary: When the ABI namespace isn't a reserved identifier, we were issuing a warning, but this should have been an error since the beginning. This commit enforces that the ABI namespace is a reserved identifier, and changes the ABI namespace used by LibFuzzer. Reviewers: phosek, EricWF Subscribers: mgorny, christof, jkorous, dexonsmith, #sanitizers, libcxx-commits, llvm-commits Tags: #sanitizers, #libc, #llvm Differential Revision: https://reviews.llvm.org/D69408
* [libc++] Move the linker script generation step to CMakeLouis Dionne2019-10-081-6/+0
| | | | | | | | | | | | | | | | | | Summary: This allows the linker script generation to query CMake properties (specifically the dependencies of libc++.so) instead of having to carry these dependencies around manually in global variables. Notice the removal of the LIBCXX_INTERFACE_LIBRARIES global variable. Reviewers: phosek, EricWF Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D68343 llvm-svn: 374116
* [libc++] Make sure we link all system libraries into the benchmarksLouis Dionne2019-10-081-0/+61
| | | | | | | | | It turns out that r374056 broke _some_ build bots again, specifically the ones using sanitizers. Instead of trying to link the right system libraries to the benchmarks bit-by-bit, let's just link exactly the system libraries that libc++ itself needs. llvm-svn: 374079
* [libc++] Localize common build flags into a single CMake functionLouis Dionne2019-10-041-0/+11
| | | | | | | | Also, set those flags for the cxx_experimental target. Otherwise, cxx_experimental doesn't build properly when neither the static nor the shared library is compiled (yes, that is a weird setup). llvm-svn: 373808
* Add an off-by-default option to enable testing for gdb pretty printers.Sterling Augustine2019-10-041-0/+1
| | | | | | | | | | | | | | | | Summary: The current version of the pretty printers are not python3 compatible, so turn them off by default until sufficiently improved. Reviewers: MaskRay, tamur Subscribers: mgorny, christof, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68477 llvm-svn: 373796
* [libc++] Make the modules-related flags PUBLIC instead of PRIVATELouis Dionne2019-10-041-2/+2
| | | | | | | It appears that those need to be propagated to targets that use libc++ as well, otherwise they don't build properly. llvm-svn: 373773
* [libc++] Move more CMake flags to per-target definitionsLouis Dionne2019-10-041-19/+25
| | | | | | | This daily refactoring tackles flags related to modules, exceptions and RTTI. llvm-svn: 373767
* [libc++] Add a per-target flag to include the generated config_siteLouis Dionne2019-10-031-12/+12
| | | | | | | | | | | This allows propagating the include automatically to targets that depend on one of the libc++ targets such as the benchmarks. Note that the GoogleBenchmark build itself still needs to manually specify the -include, since I don't know of any way to have an external project link against one of the libc++ targets (which would propagate the -include automatically). llvm-svn: 373631
* [libc++] Use functions instead of global variables to set libc++ build flagsLouis Dionne2019-10-021-38/+73
| | | | | | | | This commit follows the trend of doing things per-target instead of modifying the C++ flags globally. It does so for visibility-related flags, other basic build flags and Windows-specific flags. llvm-svn: 373517
* [libc++] Use a function to set warning flags per targetLouis Dionne2019-10-021-32/+33
| | | | | | | | | | This is part of a larger shift to move to per-target settings and eradicate global variables from the CMake build. I'm starting small with warnings only because those are easy to transition over and I want to see how it pans out, but we can handle all flags like exceptions and RTTI in the future. llvm-svn: 373511
* [libc++] Re-apply workaround for D63883Louis Dionne2019-10-011-0/+10
| | | | | | | | | In reality, this workaround is for the fact that LIBCXX_CXX_ABI=libcxxabi can't be specified on Linux, since libc++abi isn't shipped with the system. Since the build bots explicitly specify LIBCXX_CXX_ABI=libcxxabi, they fail unless we apply the workaround. llvm-svn: 373385
* [libc++] Remove workaround for D63883Louis Dionne2019-10-011-10/+0
| | | | | | | | | | I tried applying D63883 three times and could never get around to making it work. I'm giving up on that for now, but soon this should be irrelevant anyway since all builds will move to the monorepo (where we're always using the in-tree libc++abi unless explicitly specified otherwise). llvm-svn: 373384
* Revert "[libc++] Take 3: Do not cleverly link against libc++abi just because ↵Louis Dionne2019-08-081-0/+23
| | | | | | | | | | | it happens to be there" This also reverts "[libc++] Remove temporary hack for D63883". Clearly, I don't understand how the Linux build bots are configured. Differential Revision: https://reviews.llvm.org/D63883 llvm-svn: 368238
* [libc++] Remove temporary hack for D63883Louis Dionne2019-08-071-10/+0
| | | | | | | This should fix the build bots, who now specify explicitly that they're building against libc++abi. llvm-svn: 368216
* [libc++] Take 3: Do not cleverly link against libc++abi just because it ↵Louis Dionne2019-08-071-13/+0
| | | | | | | | | | | | | | | | | | | | | | | happens to be there Summary: Otherwise, when libcxxabi is not an enabled project in the monorepo, we get a link error because we try to link against non-existent cxxabi_shared. More generally, we shouldn't change the behavior of the build based on implicit things like whether a file happens to be at a specific path or not. This is a re-application of r365222 that had been reverted in r365233 and then r365359 because it broke the build bots. The build bots should now specify explicitly what ABI library they want to use (libc++abi), so this commit should now be OK to merge. It takes a while for build bots to pick up configuration changes, which is why this failed the last time around. Differential Revision: https://reviews.llvm.org/D63883 llvm-svn: 368213
* [libc++] Take 2: Integrate the PSTL into libc++Louis Dionne2019-08-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+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/+2
| | | | | | | | | | | | | | | | | | | | | | 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
* Bump the trunk version to 10.0.0svnHans Wennborg2019-07-181-1/+1
| | | | | | and clear the release notes. llvm-svn: 366427
* Constrain workaround to avoid affecting other buildbotsEric Fiselier2019-07-151-2/+4
| | | | llvm-svn: 366122
* Add another buildbot username to the workaround listEric Fiselier2019-07-121-1/+1
| | | | llvm-svn: 365848
* Attempt to override broken buildbot config for libc++abi.Eric Fiselier2019-07-121-0/+8
| | | | | | | | | | | The buildbots were changed to pass -DLIBCXX_CXX_ABI=libcxxabi, but they don't provide an include path for the library, so cxxabi.h is never found while building libc++. This is a temporary change until the buildbots are updated or until D63883 lands in a form that unbreaks the bots llvm-svn: 365847
* Revert "[libc++] Take 2: Do not cleverly link against libc++abi just because ↵Vitaly Buka2019-07-081-0/+13
| | | | | | | | | | | | | | it happens to be there" r365326 still breaks bots: http://lab.llvm.org:8011/builders/netbsd-amd64/builds/20712/steps/ninja%20build%20local/logs/stdio http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-autoconf/builds/39477/steps/test%20tsan%20in%20debug%20compiler-rt%20build/logs/stdio And probably others This reverts commit 945b9ec0693390ef35fe8c6b774495312246b8b6. llvm-svn: 365359
* [libc++] Take 2: Do not cleverly link against libc++abi just because it ↵Louis Dionne2019-07-081-13/+0
| | | | | | | | | | | | | | | | | | | | | happens to be there Summary: Otherwise, when libcxxabi is not an enabled project in the monorepo, we get a link error because we try to link against non-existent cxxabi_shared. More generally, we shouldn't change the behavior of the build based on implicit things like whether a file happens to be at a specific path or not. This is a re-application of r365222 that had been reverted in r365233 because it broke the build bots. However, the build bots now specify explicitly what ABI library they want to use (libc++abi), so this commit should now be OK to merge. Differential Revision: https://reviews.llvm.org/D63883 llvm-svn: 365326
* Revert "[libc++] Do not cleverly link against libc++abi just because it ↵Louis Dionne2019-07-051-0/+13
| | | | | | | | happens to be there" This reverts r365222, which broke the libc++ build bots. llvm-svn: 365233
* [libc++] Do not cleverly link against libc++abi just because it happens to ↵Louis Dionne2019-07-051-13/+0
| | | | | | | | | | | | | | | | | | | | | | be there Summary: Otherwise, when libcxxabi is not an enabled project in the monorepo, we get a link error because we try to link against non-existent cxxabi_shared. More generally, we shouldn't change the behavior of the build based on implicit things like whether a file happens to be at a specific path or not. Reviewers: EricWF Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D63883 llvm-svn: 365222
* Fix placement of -Wno-ignored-attributesEric Fiselier2019-06-231-2/+3
| | | | llvm-svn: 364144
* Disable -Wignored-attributes for nowEric Fiselier2019-06-231-0/+1
| | | | llvm-svn: 364142
* [runtimes] Check if pragma comment(lib, ...) is supported firstPetr Hosek2019-05-301-0/+4
| | | | | | | | | This fixes the issue introduced by r362048 where we always use pragma comment(lib, ...) for dependent libraries when the compiler is Clang, but older Clang versions don't support this pragma so we need to check first if it's supported before using it. llvm-svn: 362055
* Rework std::type_info definition to support systems without fullyEric Fiselier2019-05-291-1/+15
| | | | | | | | | | | | | | | | | | merged type info names. Previously std::type_info always expected type info string to be unique. But this isn't always the case. Like when -Bsymbolic is passed to the linker or due to llvm.org/PR37398. This patch adds the LIBCXX_HAS_MERGED_TYPEINFO_NAMES_DEFAULT CMake option which, when specified, overrides the default configuration for the library. The current defaults still assume unique names even though this isn't strictly correct for ELF binaries. We should consider changing the default in a follow up commit. llvm-svn: 361913
* [runtimes] Move libunwind, libc++abi and libc++ to lib/$target/c++ and ↵Petr Hosek2019-05-221-9/+11
| | | | | | | | | | | | | | | | | include/c++ This change is a consequence of the discussion in "RFC: Place libs in Clang-dedicated directories", specifically the suggestion that libunwind, libc++abi and libc++ shouldn't be using Clang resource directory. Tools like clangd make this assumption, but this is currently not true for the LLVM_ENABLE_PER_TARGET_RUNTIME_DIR build. This change addresses that by moving the output of these libraries to lib/$target/c++ and include/c++ directories, leaving resource directory only for compiler-rt runtimes and Clang builtin headers. Differential Revision: https://reviews.llvm.org/D59168 llvm-svn: 361432
* [gn] Support for building libc++Petr Hosek2019-05-021-2/+1
| | | | | | | | | | | | This change introduces support for building libc++. The library build should be complete, but not all CMake options have been replicated in GN. We also don't support tests yet. We only support two stage build at the moment. Differential Revision: https://reviews.llvm.org/D61143 llvm-svn: 359806
* [libcxx] Move CMake file to src, avoid using globsPetr Hosek2019-05-011-1/+1
| | | | | | | | | This addresses the longstanding FIXME and makes libc++ build more similar to other runtimes. Differential Revision: https://reviews.llvm.org/D61275 llvm-svn: 359656
* [libc++][CMake] Always provide new/delete in libc++ unless specified otherwiseLouis Dionne2019-04-181-12/+2
| | | | | | | | | | | | | | | | | | Summary: Let's not try to be clever and detect it based on the libc++abi setting. The only build that puts new/delete in libc++abi is Apple's and we set this CMake option explicitly in both libc++ and libc++abi. Complicated dependent options hurt, let's avoid them when possible. Reviewers: phosek, EricWF Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D60797 llvm-svn: 358671
* [libc++][CMake] Allow building neither the shared nor the static libraryLouis Dionne2019-04-171-4/+0
| | | | | | It's possible to build just the headers, and we actually do it. llvm-svn: 358608
* [libc++][CMake] Allow merging libc++abi.a into libc++ even on Apple platformsLouis Dionne2019-03-251-6/+2
| | | | | | | | | | | | | | | | | | | | Summary: I can't see a good reason to disallow this, even though it isn't the standard way we build libc++ for Apple platforms. Making this work on Apple platforms requires using different flags for --whole-archive and removing the -D flag when running `ar` to merge archives because that flag isn't supported by the `ar` shipped on Apple platforms. This shouldn't be an issue since the -D option appears to be enabled by default in GNU `ar`. Reviewers: phosek, EricWF, serge-sans-paille Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D59513 llvm-svn: 356903
* Allow disabling of filesystem library.Eric Fiselier2019-03-211-0/+6
| | | | | | | | | | | | | | Summary: Filesystem doesn't work on Windows, so we need a mechanism to turn it off for the time being. Reviewers: ldionne, serge-sans-paille, EricWF Reviewed By: EricWF Subscribers: mstorsjo, mgorny, christof, jdoerfert, libcxx-commits Differential Revision: https://reviews.llvm.org/D59619 llvm-svn: 356633
* [libc++][CMake] Clean up some of the libc++ re-exporting logicLouis Dionne2019-03-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | Summary: This change allows specifying the version of libc++abi's ABI to re-export when configuring CMake. It also clearly identifies which ABI version of libc++abi each export file contains. Finally, it removes hardcoded knowledge about the 10.9 SDK for MacOS, since that knowledge is not relevant anymore. Indeed, libc++ can't be built with the toolchain that came with the 10.9 SDK anyway because the version of Clang it includes is too old (for example if you want to build a working libc++.dylib, you need bugfixes to visibility attributes that are only in recent Clangs). Reviewers: dexonsmith, EricWF Subscribers: mgorny, christof, jkorous, arphaman, libcxx-commits Differential Revision: https://reviews.llvm.org/D59489 llvm-svn: 356587
* [libc++] Build <filesystem> support as part of the dylibLouis Dionne2019-03-191-17/+0
| | | | | | | | | | | | | | | | | | | Summary: This patch treats <filesystem> as a first-class citizen of the dylib, like all other sub-libraries (e.g. <chrono>). As such, it also removes all special handling for installing the filesystem library separately or disabling part of the test suite from the lit command line. Unlike the previous attempt (r356500), this doesn't remove all the filesystem tests. Reviewers: mclow.lists, EricWF, serge-sans-paille Subscribers: mgorny, christof, jkorous, dexonsmith, jfb, jdoerfert, libcxx-commits Differential Revision: https://reviews.llvm.org/D59152 llvm-svn: 356518
* Revert "[libc++] Build <filesystem> support as part of the dylib"Louis Dionne2019-03-191-0/+17
| | | | | | | | When I applied r356500 (https://reviews.llvm.org/D59152), I somehow deleted all of filesystem's tests. I will revert r356500 and re-apply it properly. llvm-svn: 356505
* [libc++] Build <filesystem> support as part of the dylibLouis Dionne2019-03-191-17/+0
| | | | | | | | | | | | | | | | Summary: This patch treats <filesystem> as a first-class citizen of the dylib, like all other sub-libraries (e.g. <chrono>). As such, it also removes all special handling for installing the filesystem library separately or disabling part of the test suite from the lit command line. Reviewers: mclow.lists, EricWF, serge-sans-paille Subscribers: mgorny, christof, jkorous, dexonsmith, jfb, jdoerfert, libcxx-commits Differential Revision: https://reviews.llvm.org/D59152 llvm-svn: 356500
* [libc++][NFC] Promote CMake comment to an actual option descriptionLouis Dionne2019-03-181-3/+3
| | | | llvm-svn: 356386
* Revert "[runtimes] Move libunwind, libc++abi and libc++ to lib/ and include/"Matthew Voss2019-03-081-11/+9
| | | | | | | | This broke the windows bots. This reverts commit 28302c66d2586074f77497d5dc4eac7182b679e0. llvm-svn: 355725
OpenPOWER on IntegriCloud