summaryrefslogtreecommitdiff
path: root/cmake
AgeCommit message (Collapse)Author
2017-06-11build: use cmake to pass -std=c++11Saleem Abdulrasool
Rather than manually checking for support for the spelling of the C++ standard, indicate to CMake that we require that the compiler support C++11 and that we compile without the GNU extensions. This simplifies the flags handling in libc++abi itself by relying on CMake to translate the flag and add it as appropriate. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@305175 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-11build: use POSITION_INDEPENDENT_CODE CMake propertySaleem Abdulrasool
Use the POSITION_INDEPENDENT_CODE target property to indicate that we should be building with -fPIC or the equivalent flag based on the toolchain that we are using. This makes the check more portable and simplifies the flags management. Because we don't want this setting to propagate in the case of an in-tree build, set the property on the targets we construct explicitly rather than setting CMAKE_POSITION_INDEPENDENT_CODE to ON globally. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@305174 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-03[libcxxabi] HandleLLVMOptions in out of tree buildMartell Malone
Differential revision: https://reviews.llvm.org/D33753 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@304664 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-26[libcxxabi] iconv is not needed for mingw-w64Martell Malone
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@304026 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-11[Libcxxabi]: Support using compiler-rt for MinGW64Martell Malone
Reviewers: EricWF Differential Revision: https://reviews.llvm.org/D33098 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@302824 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-11Fix Libc++abi linking under MinGW64Eric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@302760 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-11Apply libc++ MinGW CMake fix to libc++abiEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@302754 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-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
2016-08-29[CMake] Trying to fix the bots I brokeChris Bieneman
See: http://lab.llvm.org:8011/builders/libcxx-libcxxabi-x86_64-linux-ubuntu-cxx1z/builds/981/steps/build.libcxxabi/logs/stdio git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@280023 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-29[CMake] Use -std=c++11 if supportedChris Bieneman
Summary: This patch adds a check for if -std=c++11 is a supported flag, and adds it to CMAKE_CXX_FLAGS if it is supported. Reviewers: EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24007 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@280021 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-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
2015-12-14[libc++abi] Use libgcc and libgcc_s to provide _Unwind symbols instead of ↵Eric Fiselier
libgcc_eh.a Summary: libgcc_eh.a cannot be used when building libc++abi as a shared library (the default configuration). See this post for some more discussion: https://gcc.gnu.org/ml/gcc/2012-03/msg00104.html This patch reverts back to using libgcc_s when linking libc++abi.so. Reviewers: danalbert, chandlerc, mclow.lists, ismail, compnerd Subscribers: vkalintiris, cfe-commits Differential Revision: http://reviews.llvm.org/D15440 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@255559 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10Replace cmake check for printf with a check for fopen.Evgeniy Stepanov
Printf is a builtin, and the check fails with -Werror because of a clang warning about an incompatible redeclaration. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@255186 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-06unwind: use -fno-rtti -fno-exceptions -funwind-tablesSaleem Abdulrasool
RTTI and exceptions are not needed for the unwinder, the use of C++ there is for very specific cases, and does not require dynamic_cast nor does it use exceptions. This avoids unnecessary references to type information being emitted. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@228408 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-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
2014-12-18[libcxxabi] Add __cxa_thread_atexit for TLS support on Linux.Dan Albert
Summary: Fixes PR21738. The implementation for this is handled by __cxa_thread_atexit_impl, which is supplied by libc. More information: https://sourceware.org/glibc/wiki/Destructor%20support%20for%20thread_local%20variables Reviewers: mclow.lists, EricWF, jroelofs Reviewed By: jroelofs Subscribers: majnemer, cfe-commits Differential Revision: http://reviews.llvm.org/D6708 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@224477 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-18libcxxabi must link to dl if using bundled unwindJonathan Roelofs
Patch by Ismail Donmez http://reviews.llvm.org/D4953 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@215950 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-14Fix for libc++abi when using -Wl,--as-needed.Dan Albert
The cmake files for libc++abi and the unwinder weren't linking against libpthread or an unwind library. If the tests were linked with -Wl,--as-needed, these libraries wouldn't be linked, causing them to fail. Patch contributed by İsmail Dönmez. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@212958 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-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