summaryrefslogtreecommitdiffstats
path: root/libcxxabi/test/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* [libcxxabi] Allow tests to link with static libc++abi/libc++ even if the ↵Sergej Jaskiewicz2020-01-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | shared version is present Summary: Right now the only way to force libc++abi tests to link with the static version of libc++abi is to set `LIBCXXABI_ENABLE_SHARED` to `OFF`. However, this doesn't work when libc++abi is built as standalone project because of [this](https://github.com/llvm/llvm-project/blob/54c522420347e58aa7bae1892cf5c5672b57c875/libcxxabi/CMakeLists.txt#L503-L519). This change allows specifying the version of the library for tests to link with. This is useful for remote testing, for example, with `SSHExecutor`, where we _have_ to link with libc++abi statically. Two new CMake options are introduced here: `LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXXABI` and `LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX`. They can be set to `OFF` to tell the test utility to link tests with the static libraries. It shouldn't break anything, because the default values of these options are set such that the test utility will behave the same way. Reviewers: EricWF, mclow.lists, phosek, mehdi_amini, ldionne, jroelofs, bcraig Subscribers: mgorny, christof, ldionne, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D71894
* [libc++abi] Fix tests when pstl is enabledLouis Dionne2019-08-081-0/+1
| | | | llvm-svn: 368286
* [CMake] Update lit test configurationPetr Hosek2019-02-051-0/+1
| | | | | | | | | There are several changes: - Don't stringify Pythonized bools (that's why we're Pythonizing them) - Support specifying target and sysroot via CMake variables - Use consistent spelling for --target, --sysroot, --gcc-toolchain llvm-svn: 353137
* Fix standalone test-suite run.Eric Fiselier2018-01-171-4/+5
| | | | | | | | | This patch updates libc++abi's HandleOutOfTreeLLVM.cmake to match libc++'s -- and more importantly, to fix a bug where llvm-lit wasn't found/created when libc++abi was built out-of-tree. This prevented the test suite from running. llvm-svn: 322768
* Fix PR25874 - cxa_thread_atexit_test.pass.cpp has an incorrect XFAIL.Eric Fiselier2017-04-201-1/+0
| | | | llvm-svn: 300925
* Fix PR25874 - Detect features required for cxa_thread_atexit_test.pass.cppEric Fiselier2017-03-041-0/+1
| | | | llvm-svn: 296940
* [libcxxabi] Cleanup and adapt for r291275. NFC.Asiri Rathnayake2017-01-091-2/+2
| | | | | | | | | | | + Now that libcxxabi shares the same threading API as libcxx, a whole chunk of code in src/config.h is made redundant (I missed this earlier). + r291275 split off the externalized-thread-api libcxx configuration from the external-thread-library libcxx configuration. libcxxabi should follow the same approach. llvm-svn: 291440
* [libcxxabi] Introduce an externally threaded libc++abi variant.Asiri Rathnayake2017-01-031-0/+5
| | | | | | | | | | r281179 Introduced an externally threaded variant of the libc++ library. This patch adds support for a similar library variant for libc++abi. Differential revision: https://reviews.llvm.org/D27575 Reviewers: EricWF llvm-svn: 290888
* Provide a fallback __cxa_thread_atexit() implementation. Patch from Tavian ↵Eric Fiselier2016-10-121-1/+0
| | | | | | Barnes llvm-svn: 283988
* [CMake] Be more consistent about naming targets and components in libc++abiEric Fiselier2016-08-281-1/+4
| | | | | | | | | | | | | | | | | | This patch (and commit summary) mirror r279675 by Chris B which was applied to libc++ but not libc++abi. 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 libcxxabi to cxxabi. 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. llvm-svn: 279938
* [CMake] Apply r279151 cleanup to libc++abi.Eric Fiselier2016-08-281-1/+2
| | | | | | | | | | | | This patch applies changes similar to those in r279515 to libc++abi. Summary of changes in this patch: * Renamed variable LLVM_CONFIG -> LLVM_CONFIG_PATH * Renamed variable LIBCXXABI_BUILT_STANDALONE -> LIBCXXABI_STANDALONE_BUILD * Add an include of AddLLVM in the tests subdirectory for add_lit_testsuite. llvm-svn: 279936
* Do not depend on unwind when building standalonePetr Hosek2016-08-081-4/+3
| | | | | | | | | | When libcxxabi is being built standalone, unwind dependency is not available, so do not use it even when LLVM unwinder is being requested. Differential Revision: https://reviews.llvm.org/D23228 llvm-svn: 278058
* [libcxxabi] Allow target flags to affect configuration tests.Eric Fiselier2016-06-021-1/+1
| | | | | | | | | | | | | | | | | | | | | Summary: This patch changes the libc++abi 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. Additionally this patch adds `LIBCXXABI_BUILD_32_BITS` which defaults to `LLVM_BUILD_32_BITS`. This patch fixes: https://llvm.org/bugs/show_bug.cgi?id=27950 https://llvm.org/bugs/show_bug.cgi?id=27959 Reviewers: danalbert, jroelofs, bcraig, compnerd, EricWF Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20886 llvm-svn: 271470
* [libcxxabi] Introduce a -fno-exceptions libc++abi libary variantAsiri Rathnayake2016-05-311-0/+1
| | | | | | | | | | | | | | | | | Currently there is only support for a -fno-exceptions libc++ build. This is problematic for functions such as std::terminate() which are defined in libc++abi and using any of those functions throws away most of the benefits of using -fno-exceptions (code-size). This patch introduces a -fno-exceptions libc++abi build to address this issue. This new variant of libc++abi cannot be linked against any with-exceptions code as some symbols necessary for handling exceptions are missing in this library. Differential revision: http://reviews.llvm.org/D20677 Reviewers: EricWF, mclow.lists, bcraig llvm-svn: 271267
* Enable testing for static libc++abiBen Craig2016-04-191-1/+11
| | | | | | | | | | | | | This change leverages framework changes made in libcxx. See those changes for more details. (http://reviews.llvm.org/D16544) Some Mac specific logic for testing against libc++abi had to be moved from libcxxabi's config.py, as it was overriding choices made in libcxx's config.py. That logic is now in libcxx's target_info.py. http://reviews.llvm.org/D16545 llvm-svn: 266729
* [libcxxabi] Disable cxa_thread_atexit_test if unavailableJonas Hahnfeld2016-03-171-0/+1
| | | | | | | | | The feature check is already in place when building the library but wasn't honored for the tests. Differential Revision: http://reviews.llvm.org/D18205 llvm-svn: 263699
* Convert LIBCXXABI_BUILD_32_BITS to LLVM_BUILD_32_BITS.Eric Fiselier2015-09-011-1/+1
| | | | llvm-svn: 246516
* [libcxxabi] Build both static and shared versions of libc++abi by default.Eric Fiselier2015-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | Summary: This patch builds both static and shared versions of libc++abi by default. It adds/repurposes the following cmake options: * `LIBCXXABI_ENABLE_SHARED`: Enable/disable building the shared library. (Previously using `OFF` would build the static library instead) * `LIBCXXABI_ENABLE_STATIC`: Enable/disable building the static library. This patch also re-purposes the CMake target `cxxabi` to be a meta-target for `cxxabi_shared` and `cxxabi_static`. This could potentially break other builds that depend on `cxxabi` being a library target. We will need to apply a patch to libc++'s CMake before committing this change. Running the tests is still only supported when the shared version is built. Support for running the tests against the static library will come in another patch. Reviewers: jroelofs, mclow.lists, danalbert, compnerd Reviewed By: danalbert, compnerd Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D8013 llvm-svn: 231075
* Add remote testing support to the lit configJonathan Roelofs2015-02-261-0/+4
| | | | | | | Now that the corresponding support in libcxx has landed (r230592), adding support here is pretty simple. llvm-svn: 230643
* Merge libc++abi's lit configuration with libc++'sJonathan Roelofs2015-01-211-0/+1
| | | | | | http://reviews.llvm.org/D6985 llvm-svn: 226737
* [cmake/multilib] Teach libc++abi's CMake build to support multilibChandler Carruth2014-12-291-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | libdir suffixes like 'lib64' or 'lib32'. This support is currently very rhudimentary. We define a variable LIBCXXABI_LIBDIR_SUFFIX. In a standalone build of libc++abi this can be directly set as a cached variable to control the multilib suffix used. When building libc++abi within a larger LLVM build, it is hard wired to whatever LLVM libdir suffix has been selected. If this doesn't work for someone, just let me know. I'm happy to change it. Unfortunately, libc++abi's lit setup made this somewhat problematic to change. It was setting variables up in a way that caused the resulting build to not work with lit at all. To fix that, I've moved some variables around in the CMake build to more closely match where and how they are defined in the libc++ CMake build. This includes specifically defining a library root variable in the CMake build where the libdir suffix can be applied, and then using that rather than re-computing it from the object directory in the lit config. This is essentially new functionality for libc++abi so I don't expect it to have any impact for folks until they start setting these variables. However, I know libc++abi is built in a diverse set of environments so just let me know if this causes you any problems. llvm-svn: 224927
* [libcxxabi] Refactor building and testing libc++abi without threadsEric Fiselier2014-11-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds CMake support for building and testing libc++abi without threads. 1. Add `LIBCXXABI_ENABLE_THREADS` option to CMake. 2. Propagate `LIBCXXABI_ENABLE_THREADS` to lit via lit.site.cfg.in 3. Configure tests for `LIBCXXABI_ENABLE_THREADS=OFF Currently the test suite does not work when libc++abi is built without threads because that information does not propagate to the test suite. Reviewers: danalbert, mclow.lists, jroelofs Reviewed By: jroelofs Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6393 llvm-svn: 222702
* Add support for building and testing the unwinder.Dan Albert2014-07-111-0/+5
| | | | | | | Note: The unwinder currently only works on Darwin and on ARM Linux. Non-ARM Linux support is not yet implemented, and will fail to build. llvm-svn: 212824
* Add lit configs for libcxxabi tests.Dan Albert2014-07-101-0/+28
This makes running libcxxabi tests on Linux _much_ easier. Adds a check-libcxxabi target to cmake. Also defaults to building a dynamic libc++abi. This is so that the default options still test the libc++abi that is being built. There are two problems with testing a static libc++abi. In the case of a standalone build, the tests will link the system's libc++, which might not have been built against our libc++abi. In the case of an in tree build, libc++ will prefer a dynamic libc++abi from the system over a static libc++abi from the output directory. llvm-svn: 212672
OpenPOWER on IntegriCloud