summaryrefslogtreecommitdiffstats
path: root/libcxx/cmake/config-ix.cmake
Commit message (Collapse)AuthorAgeFilesLines
* [libcxx{,abi}] Don't link libpthread and libdl on FuchsiaPetr Hosek2019-12-061-0/+5
| | | | | | | | | These are a part of the libc so linking these explicitly isn't necessary and embedding these as deplibs causes link time error. This issues was introduced in a9b5fff which changed how we emit deplibs. Differential Revision: https://reviews.llvm.org/D71135
* [libcxx][libcxxabi] Remove the unused CMake checksPetr Hosek2019-05-301-9/+0
| | | | | | | | | | | These seemed to have been used in the past but were since removed by the add_compile_flags_if_supported functions that combine these these checks and adding the flag, but the original checks were never removed. Differential Revision: https://reviews.llvm.org/D62566 llvm-svn: 362058
* [runtimes] Use -Wunknown-pragmas for the pragma checkPetr Hosek2019-05-301-0/+4
| | | | | | | This is a follow up to r362055, we need -Wunknown-pragmas otherwise the check is going to succeed it the pragma isn't supported. llvm-svn: 362057
* [runtimes] Check if pragma comment(lib, ...) is supported firstPetr Hosek2019-05-301-1/+9
| | | | | | | | | 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
* [libc++][CMake] Link against libSystem on Apple platformsLouis Dionne2019-05-021-0/+7
| | | | | | | | Instead of manually linking against libm/librt/libpthread, we should be linking against libSystem on Apple platforms, and only that. libm and libpthread are symlinks to libSystem anyway. llvm-svn: 359808
* Revert "[CMake] Use __libc_start_main rather than fopen when checking for C ↵Petr Hosek2019-01-281-1/+1
| | | | | | | | | library" This reverts commit r352341: it broke the build on macOS which doesn't seem to provide __libc_start_main in its C library. llvm-svn: 352411
* [CMake] Use __libc_start_main rather than fopen when checking for C libraryPetr Hosek2019-01-281-1/+1
| | | | | | | | | | | | | | | | | | The check_library_exists CMake uses a custom symbol definition. This is a problem when checking for C library symbols because Clang recognizes many of them as builtins, and returns the -Wbuiltin-requires-header (or -Wincompatible-library-redeclaration) error. When building with -Werror which is the default, this causes the check_library_exists check fail making the build think that C library isn't available. To avoid this issue, we should use a symbol that isn't recognized by Clang and wouldn't cause the same issue. __libc_start_main seems like reasonable choice that fits the bill. Differential Revision: https://reviews.llvm.org/D57142 llvm-svn: 352341
* Correct typo: LIBCXXABI_BUILTINS_LIBRARY -> LIBCXX_BUILTINS_LIBRARYEric Fiselier2017-05-251-1/+1
| | | | llvm-svn: 303929
* libcxx: fix bootstrapping for mingw-w64Martell Malone2017-05-251-1/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D33388 llvm-svn: 303928
* [CMake][libcxx] Use check_c_compiler_flag to check for nodefaultlibsPetr Hosek2017-04-061-1/+2
| | | | | | | | | We're using -nodefaultlibs to avoid the dependency on C++ library when using check_cxx_compiler_flag, and as such we cannot use check_cxx_compiler_flag to check the availability of -nodefaultlibs itself. llvm-svn: 299711
* [CMake][libcxx] Use builtins rather than gcc_s when compiler-rt is requestedPetr Hosek2017-04-051-1/+3
| | | | | | | | | When compiler-rt is requested, we should attempt to link compiler-rt builtins library rather than gcc_s. Differential Revision: https://reviews.llvm.org/D31617 llvm-svn: 299599
* Try to fix the libcxx build with mingw64Reid Kleckner2017-03-311-0/+5
| | | | | | | | | | | | | | | | Summary: mingw64 has lots of default libs that libc++ and its test programs should link against. With this patch, cmake now runs successfully with GCC on Windows. Reviewers: mati865, EricWF Subscribers: mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D31518 llvm-svn: 299144
* build: dont detect libraries for WindowsSaleem Abdulrasool2017-01-011-6/+27
| | | | | | | | | Hard code the defaults for Windows for the time being. The checks really are always going to return the same value. Technically, the pthread linkage is possible, however, it seems better to use the Win32 threading along with the external threading support that we have added. llvm-svn: 290801
* Fix libc++ configuration with -fsanitize-coverageIvan Krasin2016-09-011-0/+3
| | | | | | | | | | | | | | | | | | Summary: a recent change (r280015) in libc++ configuration broke LibFuzzer bot: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer/builds/12245 It's not restricted just to that bot; any code that uses the sanitize coverage and configures libc++ hits it. This CL fixes the issue. Reviewers: compnerd Subscribers: aizatsky Differential Revision: https://reviews.llvm.org/D24116 llvm-svn: 280335
* libc++: perform configuration checks with -nodefaultlibsSaleem Abdulrasool2016-08-291-4/+29
| | | | | | | | | | | | | | | | | | We're compiling libc++ with -nodefaultlibs, so we should also pass this option during the configuration checks to ensure those checks are consistent with the actual build. The primary motivation here is to ease cross-compilation against a non-standard set of C++ libraries. Previously, the configuration checks would attempt to link against the standard C++ libraries, which would cause link failures when cross-compiling, even though the actual library link would go through correctly (because of the use of -nodefaultlibs and explicitly specifying any needed libraries). This is more correct even ignoring the motivation, however. Patch by Shoaib Meenai! llvm-svn: 280015
* libc++: add an option to build against compiler-rtSaleem Abdulrasool2016-08-241-1/+3
| | | | | | This mirrors the option in libc++abi to build without libgcc. llvm-svn: 279606
* Revert "libc++: Perform configuration checks with -nodefaultlibs"Saleem Abdulrasool2016-08-241-21/+2
| | | | | | | This reverts SVN r279584 which broke the buildbots. Will re-apply once the issue has been root-caused and fixed. llvm-svn: 279596
* libc++: Perform configuration checks with -nodefaultlibsSaleem Abdulrasool2016-08-231-2/+21
| | | | | | | | | | | | | | | | | We're compiling libc++ with -nodefaultlibs, so we should also pass this option during the configuration checks to ensure those checks are consistent with the actual build. The primary motivation here is to ease cross-compilation against a non-standard set of C++ libraries. Previously, the configuration checks would attempt to link against the standard C++ libraries, which would cause link failures when cross-compiling, even though the actual library link would go through correctly (because of the use of -nodefaultlibs and explicitly specifying any needed libraries). This is more correct even ignoring the motivation, however. Patch by Shoaib Meenai! llvm-svn: 279584
* Fix r260515 - Correct typos in CMake changesEric Fiselier2016-02-111-4/+0
| | | | llvm-svn: 260524
* Re-commit "Introduce a cmake module to figure out whether we need to link ↵Vasileios Kalintiris2016-02-111-0/+5
| | | | | | | | | | with libatomic." This re-applies commit r260235. However, this time we add -gcc-toolchain to the compiler's flags when the user has specified the LIBCXX_GCC_TOOLCHAIN variable. llvm-svn: 260515
* Revert "Introduce a cmake module to figure out whether we need to link with ↵Vasileios Kalintiris2016-02-091-5/+0
| | | | | | | | | | | libatomic." This reverts commit r260235. It breaks LLVM's bootstrap when building with a -gcc-toolchain and the system's gcc installation does not provide the libatomic library and its headers. We should check whether LIBCXX_GCC_TOOLCHAIN is set and adjust the flags accordingly. llvm-svn: 260323
* Introduce a cmake module to figure out whether we need to link with libatomic.Vasileios Kalintiris2016-02-091-0/+5
| | | | | | | | | | | | | | Summary: This fixes the tests under std/atomics for 32-bit MIPS CPUs where the 8-byte atomic operations call into the libatomic library. Reviewers: dsanders, mclow.lists, EricWF, jroelofs, joerg Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16613 llvm-svn: 260235
* Replace cmake check for printf with a check for fopen.Evgeniy Stepanov2015-12-101-1/+1
| | | | | | | Printf is a builtin, and the check fails with -Werror because of a clang warning about an incompatible redeclaration. llvm-svn: 255187
* [libcxx] Add new Sphinx documentationEric Fiselier2015-08-221-1/+0
| | | | | | | | | | | | | | | | | Summary: This patch adds Sphinx based documentation to libc++. The goal is to make it easier to write documentation for libc++ since writing new documentation in HTML is cumbersome. This patch rewrites the main page for libc++ along with the instructions for using, building and testing libc++. The built documentation can be found and reviewed here: http://efcs.ca/libcxx-docs In order to build the sphinx documentation you need to specify the cmake options `-DLLVM_ENABLE_SPHINX=ON -DLIBCXX_INCLUDE_DOCS=ON`. This will add the makefile rule `docs-libcxx-html`. Reviewers: chandlerc, mclow.lists, danalbert, jroelofs Subscribers: silvas, cfe-commits Differential Revision: http://reviews.llvm.org/D12129 llvm-svn: 245788
* Reapply working parts of CMake cleanup.Eric Fiselier2015-07-301-17/+2
| | | | | | | This patch adds the working parts of r243503. The difference with this patch is that it doesn't include the HandleLLVMOptions.cmake file. llvm-svn: 243698
* Revert recent CMake changes again due to failing compiler-rt buildsEric Fiselier2015-07-291-2/+17
| | | | llvm-svn: 243593
* Recommit r243503 "[libcxx] Cleanup CMake configuration and integrate with LLVM"Eric Fiselier2015-07-291-17/+2
| | | | | | | | | This change was reverted in r243550 because it broke clang-format builds (see PR24306). This patch recommits a fixed version of the original. llvm-svn: 243574
* Revert r243503 "[libcxx] Cleanup CMake configuration and integrate with LLVM"Hans Wennborg2015-07-291-2/+17
| | | | | | This caused clang-format to stop linking on Mac; see PR24306. llvm-svn: 243550
* [libcxx] Cleanup CMake configuration and integrate with LLVMEric Fiselier2015-07-291-17/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch contains the following changes: 1. Require that libc++ can find a LLVM source directory. This is done the same way as `libc++abi` currently does. 2. Cleanup ugly configuration code in CMakeLists.txt by using `add_flags`, `add_flags_if`, and `add_flags_if_supported` macros. The goals for this patch are: 1. Help libc++ be more consistent with how LLVM handles CMake options (see PR23670 PR23671). 2. Make it easier to use sanitizers using the `LLVM_USE_SANITIZER` option. 3. Make libc++'s CMakeLists.txt file easier to understand and change. 4. Move towards allowing libc++ to create Sphinx documentation (see http://efcs.ca/libcxx-docs). 5. Move towards allowing libc++ to use other LLVM utilities such as `not` and `FileCheck`. Reviewers: mclow.lists, jroelofs, danalbert Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11308 llvm-svn: 243503
* Add -gline-tables-only when compiling w/ sanitizers in RELEASEEric Fiselier2014-11-141-1/+2
| | | | llvm-svn: 222035
* [libcxx] Add support for LLVM_USE_SANITIZER to libcxx when being built ↵Eric Fiselier2014-08-181-21/+22
| | | | | | | | | | | | | | | | | | | | | | | | | standalone and in-tree Summary: This patch adds support for LLVM_USE_SANITIZER when being built in-tree and standalone. This patch does the following things: 1. define the LLVM_USE_SANITIZER option to "" when being built standalone. This also helps show we support it. 2. Translate LLVM_USE_SANITIZER when standalone in a very similar way done in llvm/cmake/HandleLLVMOptions.cmake. 3. Add config.llvm_use_sanitizer to lit.site.cfg.in 4. Add code to translate config.llvm_use_sanitizer's value into the needed compile flags in lit.cfg. Currently lit.cfg assumes that that the compiler supports '-fno-omit-frame-pointer' while CMakeLists.txt actually checks to see if its supported. We could pass this information to lit but I'm not sure its needed. Reviewers: mclow.lists, danalbert Reviewed By: danalbert Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4949 llvm-svn: 215872
* [libcxx] Update the way the -std= flag is chosen by CMake and LibcxxTestFormatEric Fiselier2014-08-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch does two things: CMake Update: - Add compiler flag checks for -std=c++11 and -std=c++1y and remove check for -std=c++0x. - Add configuration option LIBCXX_ENABLE_CXX1Y to prevent/allow -std=c++1y from being chosen as the std version. LIBCXX_ENABLE_CXX1Y is set to OFF by default. - if LIBCXX_ENABLE_CXX1Y is enabled then set LIBCXX_STD_VERSION to c++1y and fail if the compiler does not support -std=c++1y - If c++1y is not enabled then use c++11 and fail if the compiler does not support c++11. Lit Update: - Update lit.site.cfg.in to capture LIBCXX_STD_VERSION information as config.std. - Remove mentions of has_cxx0X configuration option. - Check for `--param std=X' passed to lit on the command line. - Choose the std for the tests either from command line parameter or (if it doesn't exist) the lit.site.cfg. Reviewers: mclow.lists, danalbert Reviewed By: danalbert Subscribers: emaste, rnk, ajwong, danalbert, cfe-commits Differential Revision: http://reviews.llvm.org/D4329 llvm-svn: 215802
* build: remove unnecessary modification of CMAKE_REQUIRED_DEFINITIONSSaleem Abdulrasool2014-03-121-8/+0
| | | | | | | | This is unnecessary now that the flag handling has been fixed. The flags will be added properly in the main CMakeLists.txt after the config-ix inclusion which performs the required check. llvm-svn: 203639
* Explicitly specify -Wno-error if LIBCXX_ENABLE_WERROR is false.Alexey Samsonov2013-10-021-0/+2
| | | | | | | | libcxx doesn't build with -Werror because of #warnings in its source code. But when libcxx is built as an external LLVM project, it inherits LLVM build flags, breaking the build if LLVM_ENABLE_WERROR is enabled. llvm-svn: 191814
* http://llvm.org/bugs/show_bug.cgi?id=9399 fixed by Ryuta SuzukiHoward Hinnant2011-05-241-0/+1
| | | | llvm-svn: 131961
* Add CMake build and fix major Linux blockers.Michael J. Spencer2010-12-101-0/+37
llvm-svn: 121510
OpenPOWER on IntegriCloud