summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
AgeCommit message (Collapse)Author
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
2016-06-01Missed part of D16545 (static lib testing)Ben Craig
http://reviews.llvm.org/D16545 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@271388 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31[CMake] Update to requiring CMake 3.4.3Chris Bieneman
Summary: This is as per the discussions on developer lists: http://lists.llvm.org/pipermail/llvm-dev/2016-April/098780.html http://lists.llvm.org/pipermail/llvm-dev/2016-May/100058.html Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20829 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@271330 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31[libcxxabi] Introduce a -fno-exceptions libc++abi libary variantAsiri Rathnayake
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 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@271267 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-26libc++abi: build with -fvisibility=hiddenSaleem Abdulrasool
Enable building libc++abi with hidden visibility by default. The ABI mandated interfaces (and a few extra) are already set up to be externally visible. This allows us to ensure that any implementation details are not leaked. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@270816 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-25Allow explicit pthread opt-inBen Craig
When building libcxxabi in tree (i.e. in llvm/projects/libcxxabi, along with llvm/projects/libcxx), libcxx's config_site.in doesn't get created in a timely manner. This means that any configuration that is normally set in libcxx's config_site.in needs to be duplicated in libcxxabi to successfully build libcxxabi. This patch does exactly that for the _LIBCPP_HAS_THREAD_API_PTHREAD preprocessor define. http://reviews.llvm.org/D20574 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@270732 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-18[CMake] Fix misleading error message in CMakeLists.txt.Eugene Zelenko
Differential revision: http://reviews.llvm.org/D17117 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@266635 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-18Respect LIBCXXABI_LIBDIR_SUFFIX before an installBen Craig
Prior to this patch, setting LIBCXXABI_LIBDIR_SUFFIX would confuse the check-libcxxabi target. libc++abi.* would get output to lib instead of lib${LIBCXXABI_LIBDIR_SUFFIX}, but the tests would look in the suffixed directory. Now, we match what libcxx does, and set the CMAKE_*_OUTPUT_DIRECTORY to the LIBRARY_DIR. http://reviews.llvm.org/D17410 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@266611 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05Update to new lists.llvm.orgTanya Lattner
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@244004 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-09LIBCXXABI_LIBUNWIND_INCLUDES is already set before calling find_path, and ↵Anton Korobeynikov
find_path will not update it. So cmake will throw error "include_directories given empty-string as include directory". Use other variable name for the include path and do not find the default libunwind.h in the system path. http://reviews.llvm.org/D9641 Patch by Jingyi Wei! git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@236936 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-08TyposAnton Korobeynikov
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@236889 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-08Fix "TODO" and provide the configure-time options to find libunwind.Anton Korobeynikov
This is done the same way as we're looking for libc++ git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@236874 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-29Fix syntax error in CMake created when a variable is not defined.Eric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@236115 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-28libc++abi: work around layering violationSaleem Abdulrasool
This papers over a layering violation currently between libc++abi and libunwind. It reaches into the sources to get the declaration of an ABI defined function. This should allow the ARM buildbot to continue building libc++abi again. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@235965 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-28libc++abi: try harder to force the LLVM unwinder on ARMSaleem Abdulrasool
Attempting to default the option to ON for ARM doesnt seem to work. Force the check lower and perform the check at the two sites that matter: the CPPFLAGS definition and the header search path setup. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@235964 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-27libc++abi: enable LLVM unwinder by default for ARMSaleem Abdulrasool
libc++abi uses EHABI extensions, which are only part of the LLVM unwinder. When targeting ARM by default, enable the use of the LLVM unwinder. Hopefully this will fix the ARM native bot git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@235904 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-25libc++abi: remove build infrastructure for unwindSaleem Abdulrasool
This removes the libunwind build infrastructure as libunwind is gaining its own CMakeLists.txt. The removal must occur first due to the multiple definitions of the same target. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@235794 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-24libc++abi: remove the duplicated unwind contentSaleem Abdulrasool
The unwinder has been moved into its own project setup at http://svn.llvm.org/projects/libunwind/trunk. This simply removes the now duplicated content. This move was previously discussed on llvmdev at [1]. [1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-January/081507.html git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@235759 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-01Revert r228351 - Dont install header files.Eric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@233781 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-17add option to tell LIT where to find the libc++ library when built out of treeEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@232518 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03[libcxxabi] Build both static and shared versions of libc++abi by default.Eric Fiselier
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 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@231075 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-05Install header filesGreg Fitzgerald
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@228351 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-05Enable -Wundef.Dan Albert
The problem that caused the need for http://reviews.llvm.org/D7419 was caused by testing the value of something that was undefined. This should prevent that in the future. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@228257 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-26Adopt CMake policy CMP0042. Set MACOSX_RPATH on by default.Eric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@227142 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-22[libcxxabi] Teach CMake better ways to find the libc++ source directory (and ↵Eric Fiselier
misc cleanup). Summary: The main section of this patch teaches CMake a new option `LIBCXXABI_LIBCXX_PATH` that specifies the path to the libcxx source root. This information is passed to lit so that it can better find libc++'s python module. `LIBCXXABI_LIBCXX_PATH` is also used to help find the libc++ headers. The rest of this patch is misc cleanup, mostly to make pep8 and pylint happy. I've also copied libc++'s .gitignore into libc++abi. Reviewers: jroelofs, danalbert Reviewed By: danalbert Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7130 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@226855 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-22Add -funwind-tables to CMAKE_C_FLAGS.Logan Chien
Without -funwind-tables, the compiler won't generate the unwinding table for these C functions. However, the functions in libunwind, such as `_Unwind_Backtrace()`, WILL unwind stack to get the backtrace. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@226823 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-22Allow libc++abi to be built without unwinder.Logan Chien
This CL adds a new compilation flags LIBCXXABI_USE_LLVM_UNWINDER to specify whether the LLVM unwinder is enabled. Besides, all unwinder-specific code are guarded with this definition. Now, libc++abi will be able to use the unwinding routine from libgcc when LIBCXXABI_USE_LLVM_UNWINDER is disabled. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@226819 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-16LIBCXXABI_TARGET_TRIPLE won't always be set.Dan Albert
Fixes issue with r226235. Build configuration difference between libc++ and libc++abi. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@226240 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-16[libc++abi] Add support for cross compiling.Dan Albert
Reviewers: EricWF, jroelofs Reviewed By: jroelofs Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6991 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@226235 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-14Update PACKAGE_VERSION to 3.7.0svnHans Wennborg
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@226014 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-29[cmake/multilib] Teach libc++abi's CMake build to support multilibChandler Carruth
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. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@224927 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-24[libcxxabi] Refactor building and testing libc++abi without threadsEric Fiselier
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 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@222702 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-19Remove accidentally commited line in commit. SorryEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@222314 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-18[libcxxabi] Refactor CMakeLists.txt's handling of compile and link flags to ↵Eric Fiselier
suppress warnings. Summary: This patch mirrors the recent change to libc++ found here http://reviews.llvm.org/D6277. This fixes PR20395 (http://llvm.org/bugs/show_bug.cgi?id=20395). Reviewers: jroelofs, mclow.lists, danalbert Reviewed By: danalbert Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6286 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@222252 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-17[libcxxabi] Document the standalone build's requirements on llvm-config and ↵Eric Fiselier
llvm sources. The current documentation does not explain that the standalone build requires the LLVM sources. This patch updates the documentation to reflect this requirement and explains how to manually specify the location of the required files. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@220049 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-26Remove strict dependency on llvm-config.Dan Albert
Depending on llvm-config allows for a few nice things (auto-detecting LLVM source tree, version numbers, etc), but it's makes bootstrapping a pain. Keep the llvm-config features around, but also fall back to being able to configure based on -DLLVM_PATH=path/to/llvm. Reviewers: jroelofs, loladiro Reviewed By: loladiro Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5016 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@216482 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-16libcxxabi cmake: Use HandleLLVMOptions.cmake, don't manually add -std=c++11.Nico Weber
No intended behavior change on Linux and Mac OS X. On Windows, having libcxxabi in one's checkout should now no longer break running cmake. (cl.exe supports c++11, but doesn't understand a -std= flag.) git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@213214 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-11Add support for building and testing the unwinder.Dan Albert
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. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@212824 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-10Make cmake cxxflags match those in lib/buildit.Dan Albert
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@212768 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-10Add lit configs for libcxxabi tests.Dan Albert
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. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@212672 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-03Add a cmake build system.Dan Albert
Will add support for tests with lit in a later patch. This does not yet support building the unwinder in src/Unwind. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@212286 91177308-0d34-0410-b5e6-96231b3b80d8