summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
AgeCommit message (Collapse)Author
2017-11-17[libcxxabi][CMake] Provide option to disable installing of the libraryPetr Hosek
This is useful in cases where we only build static library and libc++abi.a is combined with libc++.a into a single archive in which case we don't want to have libc++abi.a installed separately. The same option is already provided by libcxx CMake build. Differential Revision: https://reviews.llvm.org/D40194 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@318568 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-31libcxxabi: Suppress LLVM_ENABLE_MODULESNAKAMURA Takumi
Differential Revision: https://reviews.llvm.org/D35542 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@309551 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-19Update version to 6.0.0svnHans Wennborg
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@308461 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-11[libcxxabi][CMake] Add install path variable to allow overriding the destinationPetr Hosek
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/D33761 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@307611 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-13Set a default value for LIBCXXABI_LIBDIR_SUFFIX, fixes installing into lib64 ↵Ismail Donmez
after r304374 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@305278 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-01[libcxxabi] Rework CMakeLists.txt into modulesMartell Malone
Refactor cmake to remove dependence on LLVM's cmake modules. This improves handling of cmake checks when cross compiling and brings libcxxabi in line with libcxx and other project modules. Differential revision: https://reviews.llvm.org/D33635 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@304374 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31Remove requirement for libunwind sources. Patch by Shiz.Eric Fiselier
As per r241993, libunwind_ext.h is not used anymore, and thus only the public libunwind includes are needed. This eases distro packaging efforts and removes an unneeded requirement for out-of-tree building. Reviewed as D33178 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@304359 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-28[libcxxabi] Disable DLL annotations on staticMartell Malone
rL288692 renames _LIBCXXABI_DISABLE_DLL_IMPORT_EXPORT to _LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@304110 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-11Allow undefined symbols when linking libc++abi.dll on WindowsEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@302761 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-10[libc++abi] Disable libc++ extern templates project-wideShoaib Meenai
libc++abi can't depend on libc++, so disable extern templates in libc++ headers project-wide. This was previously done in cxa_demangle.cpp, but I consider it more appropriate to do at the cmake level (since none of libc++abi's source files can use libc++ extern templates). I also think the _LIBCPP_NO_EXCEPTIONS in cxa_demangle.cpp is suspicious, but I'm doing one thing at a time. Differential Revision: https://reviews.llvm.org/D32329 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@302739 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04[libcxxabi][CMake] Set library dir when built under runtimes/Jonas Hahnfeld
This will put libraries into the build root's lib/ directory by default. Differential Revision: https://reviews.llvm.org/D32735 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@302118 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-16[CMake][libcxxabi] Fix the -target and -gcc-toolchain flag handlingPetr Hosek
CMake has the problem with the single dash variant because of the space, so use the double dash with equal sign version. These flag need to be included in compile flags to propagate correctly. We also don't have to pass the target triple when checking for compiler-rt since that flag is already included in compile flags now. Differential Revision: https://reviews.llvm.org/D32069 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@300418 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-07[CMake][libcxxabi] Use -nodefaultlibs for CMake checksPetr Hosek
Since libc++abi is built with -nodefaultlibs, we should be using this option even for CMake checks to avoid any inconsistency and also to avoid dependency on a working C++ standard library just for the setting up the build itself. The implementation is largely similar to the one used by libc++. Differential Revision: https://reviews.llvm.org/D31639 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@299797 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-04Fix exception address alignment test for EHABIAsiri Rathnayake
This test fails on ARM bare-metal targets because it assumes the Itanium ABI, whereas EHABI requires the exception address to be 8-byte aligned. I was a bit puzzled at first because this should've failed on the public arm-linux builder too. I think the reason it passes there is because we don't include libunwind headers in the include path when running the libcxxabi tests, so the system unwind.h gets picked up. Reviewers: rengolin, EricWF Differential revision: https://reviews.llvm.org/D31178 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@299435 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-04Fix CMake configuration errors on OS XEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296954 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-04Turn on -Wunused-function and cleanup occurancesEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296936 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-02Work around GCC linking errors within libc++abi due to missing new/delete ↵Eric Fiselier
definitions git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296823 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-02[libc++abi] Add option to enable definitions for the new/delete overloads.Eric Fiselier
Summary: Currently both libc++ and libc++abi provide definitions for operator new/delete. However I believe this is incorrect and that one or the other should offer them. This patch adds the CMake option `-DLIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS` which defaults to `OFF` unless otherwise specified. This means that by default only libc++ provides the new/delete definitions. Reviewers: mclow.lists, mehdi_amini, dexonsmith, beanz, jroelofs, danalbert, smeenai, rmaprath, mgorny Reviewed By: mehdi_amini Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D30517 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296801 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01[libcxxabi] Clean up macro usage.Ranjeet Singh
Convention in libcxxabi is to use !defined(FOO) not !FOO. Differential Revision: https://reviews.llvm.org/D30459 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296612 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-18[CMake][libcxxabi] Update the libc++ test module pathPetr Hosek
The libcxx/test/libcxx Python package has been moved into libcxx/utils/libcxx in r294651, but libcxxabi's CMakeLists.txt still looks for the old path. Differential Revision: https://reviews.llvm.org/D30133 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@295540 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-09[libcxxabi][CMake] Support in-tree libunwind when building as part of runtimesPetr Hosek
When building as part of runtimes, there is no predefined order in which the runtimes are loaded, so the targets from other projects might not be available. We need to rely on HAVE_<name> variables instead in that case. Differential Revision: https://reviews.llvm.org/D29574 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@294552 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-14[cmake] Handle missing LIBUNWIND_* directories gracefullyMichal Gorny
Add LIBUNWIND_* directories to include path only if they were actually found, in order to fix the CMake error. Both of the directories are usually unnecessary since libcxxabi uses only the common part of unwind.h that is supplied both by GCC and Clang. Differential Revision: https://reviews.llvm.org/D25314 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@292018 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-14Don't dump llvm-config --cmakedir output if command fails.Eric Fiselier
This patch adjusts the out-of-tree CMake configuration so that the stderr output is ignored when an old llvm-config is found that doesn't support --cmakedir. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@291993 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-13[libc++abi] Add a silent terminate handler to libcxxabi.James Y Knight
The current std::terminate_handler pulls in some string code, some I/O code, and more. Since it is automatically setup as the default, this means that any trivial binary linking against libcxxabi will get this extra bloat. This patch allows disabling it as a build-time option, if you want to avoid the extra bloat. Patch by Tom Rybka! Reviewers: EricWF Subscribers: danalbert, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D28497 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@291946 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-12Bump version to 5.0.0svnHans Wennborg
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@291829 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-09[cmake] Obtain LLVM_CMAKE_PATH from llvm-config if availableMichal Gorny
Use the new --cmakedir option to obtain LLVM_CMAKE_PATH straight from llvm-config. Fallback to local reconstruction if llvm-config does not support this option. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@291506 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-09[libcxxabi] Cleanup and adapt for r291275. NFC.Asiri Rathnayake
+ 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. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@291440 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-08[libcxxabi] Enable tests by default in standalone.Bryant Wong
Tests targets will now be enabled by default when building libcxxabi out of tree (unless turned off with LIBCXXABI_INCLUDE_TESTS=OFF). Differential Revision: https://reviews.llvm.org/D28450 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@291378 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-07[libcxxabi] Add flag to conditionally enable testsBryant Wong
Differential Revision: https://reviews.llvm.org/D28449 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@291367 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03[libcxxabi] Introduce an externally threaded libc++abi variant.Asiri Rathnayake
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 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@290888 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-28add cxa_demangle_fuzzerKostya Serebryany
Summary: All easy-to-find bugs in cxa_demangle where fixed now (https://bugs.chromium.org/p/chromium/issues/detail?id=606626) except for one (https://llvm.org/bugs/show_bug.cgi?id=31031). Now I'd like to properly integrate this fuzzer with the source tree and then run the fuzzer continuously on https://github.com/google/oss-fuzz Reviewers: compnerd, mclow.lists, mehdi_amini Subscribers: cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D28133 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@290650 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-13Fix GCC libc++abi buildEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@286783 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-13[CMake] Fix libc++abi arm build w/o libunwind.Logan Chien
This commit fixes libc++abi build when LLVM unwinder (libunwind_llvm) is not enabled. This commit fixes the problem by removing "LLVM_NATIVE_ARCH MATCHES ARM" from CMakeLists.txt so that LIBCXXABI_USE_LLVM_UNWINDER will only be defined when LLVM unwinder is enabled. We need LIBCXXABI_USE_LLVM_UNWINDER becase there is a subtle difference between the unwinder from libgcc and the one from libunwind_llvm. For the unwinder from libgcc, we have to initialize register r12 with the address of _Unwind_Control_Block; otherwise, _Unwind_GetLanguageSpecificData() and _Unwind_GetRegionStart() won't work properly. Consequently, there is an extra _Unwind_SetGR() when LLVM unwinder is disabled. Check cxa_personality.cpp for details. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@286759 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-11[CMake] Check runtimes subdir when looking for libcxx and libuwindPetr Hosek
The runtimes subdir is the new location for runtimes, we should include it when looking for libcxx and libunwind headers. Differential Revision: https://reviews.llvm.org/D26362 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@286614 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-09Revert "[CMake] Check runtimes subdir when looking for libcxx and libuwind"Petr Hosek
This reverts commit eecb79506d88b268fb0d00cce178213b4aa17933. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@286334 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-09[CMake] Check runtimes subdir when looking for libcxx and libuwindPetr Hosek
The runtimes subdir is the new location for runtimes, we should include it when looking for libcxx and libunwind headers. Differential Revision: https://reviews.llvm.org/D26362 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@286332 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-07Fix typo in CMakeLists.txt: provide the path to libcxx checkout and not the ↵Mehdi Amini
include subdir git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@286164 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-07Fix libcxxabi CMake detection of libcxx path to handle ↵Mehdi Amini
LLVM_EXTERNAL_LIBCXX_SOURCE_DIR flag Differential Revision: https://reviews.llvm.org/D26364 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@286161 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-07Revert "Add some facilities to work with a git monorepo (experimental setup)"Mehdi Amini
This reverts commit r286123, accidentally commited while testing itself... git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@286124 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-07Add some facilities to work with a git monorepo (experimental setup)Mehdi Amini
Summary: Some changes are made to cmake, especially the addition of a new LLVM_ENABLE_PROJECTS option that makes the build system aware of the monorepo directory structure. Also a new script is added in llvm/utils/git-svn/. When present in the $PATH, it enables a `git llvm` command. It is providing at this point only the ability to push from the git monorepo: `git llvm push`. It is intended to evolves with more features, for instance I plan on features like `git llvm show r284955` to help working with sequential revision numbers. The push feature is taken from Justin Lebar's script available here: https://github.com/jlebar/llvm-repo-tools/ Reviewers: jlebar Subscribers: mgorny, modocache, llvm-commits Differential Revision: https://reviews.llvm.org/D26334 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@286123 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13[libcxxabi] Refactor pthread usage into a separate APIAsiri Rathnayake
This patch refactors all pthread uses of libc++abi into a separate API. This is the first step towards supporting an externlly-threaded libc++abi library. I've followed the conventions already used in the libc++ library for the same purpose. Patch from: Saleem Abdulrasool and Asiri Rathnayake Reviewed by: compnerd, EricWF Differential revisions: https://reviews.llvm.org/D18482 (original) https://reviews.llvm.org/D24864 (final) git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@284128 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03[CMake] Fix libc++abi standalone cmake build.Logan Chien
The cmake files install directory has been changed to ${prefix}/lib/cmake/llvm since r259821. Searching cmake modules in ${prefix}/share/llvm/cmake will result in fatal errors. This commit fixes the out-of-tree build by changing the CMake module search path to: "$(llvm-config --obj-root)/lib/cmake/llvm" git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@283100 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-27[libc++abi] Default to DLL annotations on WindowsShoaib Meenai
`__declspec(dllexport)` and `__declspec(dllimport)` should only be used when building libc++abi as a DLL, but that's the more common use case, so default to adding the annotations and add an option to opt out. Similar to r282449, which made the corresponding change for libc++. Differential Revision: https://reviews.llvm.org/D24945 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@282470 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-21[libcxxabi] cleanup the use of LIBCXXABI_HAS_NO_THREADS macro (NFC)Asiri Rathnayake
Align the naming / use of the macro LIBCXXABI_HAS_NO_THREADS to follow what we have in libcxx. NFC. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@282062 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-28[CMake] Apply r279151 cleanup to libc++abi.Eric Fiselier
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. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@279936 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16Default LIBCXXABI_LIBDIR_SUFFIX to LLVM_LIBDIR_SUFFIXEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@278773 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-08CMakeLists.txt cleanups: synchronize version with rest of LLVM, consistent ↵Eugene Zelenko
spacing. Differential revision: https://reviews.llvm.org/D23092 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@278030 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15libc++abi: add a top level option for using CompilerRTSaleem Abdulrasool
Add an option to opt into compiler-rt instead of libgcc. This option defaults to OFF to avoid a behaviour change. It is not possible to mix and match different runtime libraries. Disabling this requires that libc++ is built accordingly. This knob is particularly useful for targets that are GCC by default (i.e. Linux). git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@275505 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-02Partially revert r270816: build with -fvisibility=hidden.Eric Fiselier
This patch breaks the ABI on linux when libc++abi.a is statically linked into libc++.so. Certain libc++ symbols get exported from libc++abi.a as hidden and therefore they also get hidden in libc++.so. The symbols is question are: * _ZNKSt3__121__basic_string_commonILb1EE20__throw_out_of_rangeEv * _ZNKSt3__121__basic_string_commonILb1EE20__throw_length_errorEv * _ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv I imagine we just need to fix the visibility for these symbols in the libc++ headers but I'm reverting the patch until it's sorted. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@271500 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-02[libcxxabi] Allow target flags to affect configuration tests.Eric Fiselier
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 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@271470 91177308-0d34-0410-b5e6-96231b3b80d8