summaryrefslogtreecommitdiffstats
path: root/libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Provide a meaningful diagnostic when LLVM_PATH doesn't point to a directoryLouis Dionne2019-08-191-0/+3
| | | | llvm-svn: 369312
* [cmake] Fix get_llvm_lit_path() to respect LLVM_EXTERNAL_LIT alwaysMichal Gorny2019-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | Refactor the get_llvm_lit_path() logic to respect LLVM_EXTERNAL_LIT, and require the fallback to be defined explicitly as LLVM_DEFAULT_EXTERNAL_LIT. This fixes building libcxx standalone after r346888. The old logic was using LLVM_EXTERNAL_LIT both as user-defined cache variable and an optional pre-definition of default value from caller (e.g. libcxx). It included a hack to make this work by assigning the value back and forth but it was fragile and stopped working in libcxx. The new logic is simpler and more transparent. Default value is provided in a separate variable, and used only when user-specified variable is empty (i.e. not overriden). Differential Revision: https://reviews.llvm.org/D57282 llvm-svn: 352374
* [CMake] Convert paths to the right form in standalone builds on WindowsMartin Storsjo2018-06-201-3/+4
| | | | | | | | | | | | | The paths output from llvm-config --cmakedir and from clang --print-libgcc-file-name can contain backslashes, while CMake can't handle the paths in this form. This matches what compiler-rt already does (since SVN r203789 and r293195). Differential Revision: https://reviews.llvm.org/D48356 llvm-svn: 335172
* Make libcxx tests work when llvm sources are not present.Zachary Turner2017-09-201-7/+10
| | | | | | | | | | | | | | | | | | | Despite a strong CMake warning that this is an unsupported libcxx build configuration, some bots still rely on being able to check out lit and libcxx independently with no LLVM sources, and then run lit against libcxx. A previous patch broke that workflow, so this is making it work again. Unfortunately, it breaks generation of the llvm-lit script for libcxx, but we will just have to live with that until a solution is found that allows libcxx to make more use of llvm build pieces. libcxx can still run tests by using the ninja check target, or by running lit.py directly against the build tree or source tree. Differential Revision: https://reviews.llvm.org/D38057 llvm-svn: 313763
* Resubmit "Fix llvm-lit script generation in libcxx."Zachary Turner2017-09-191-0/+5
| | | | | | | | After speaking with the libcxx owners, they agreed that this is a bug in the bot that needs to be fixed by the bot owners, and the CMake changes are correct. llvm-svn: 313643
* Revert "Fix llvm-lit script generation in libcxx."Zachary Turner2017-09-191-5/+0
| | | | | | | | | | | | This reverts commit 4ad71811d45268d81b60f27e3b8b2bcbc23bd7b9. There is a bot that is checking out libcxx and lit with nothing else and then running lit.py against the test tree. Since there's no LLVM source tree, there's no LLVM CMake. CMake actually reports this as a warning saying unsupported libcxx configuration, but I guess someone is depending on it anyway. llvm-svn: 313607
* Fix llvm-lit script generation in libcxx.Zachary Turner2017-09-191-0/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D37997 llvm-svn: 313606
* Reland "[CMake][libcxx] Move Python check to main CMake file"Petr Hosek2017-01-161-7/+0
| | | | | | This relands commit r291728. llvm-svn: 292084
* Don't dump llvm-config --cmakedir output if command fails.Eric Fiselier2017-01-141-1/+2
| | | | | | | | 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. llvm-svn: 291991
* Revert "[CMake][libcxx] Move Python check to main CMake file"Petr Hosek2017-01-111-0/+7
| | | | | | This reverts commit 39441fe9f00a58ffc2fdff92a4b0e8a280a5f444. llvm-svn: 291728
* [CMake][libcxx] Move Python check to main CMake filePetr Hosek2017-01-101-7/+0
| | | | | | | | | | This is to make sure this check is called even when building as part of LLVM runtimes when we are doing standalone but not out of tree build. Differential Revision: https://reviews.llvm.org/D28392 llvm-svn: 291592
* [cmake] Obtain LLVM_CMAKE_PATH from llvm-config if availableMichal Gorny2017-01-091-1/+12
| | | | | | | | 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. llvm-svn: 291508
* [libcxx][CMake] Move the warning to HandleOutOfTreeLLVMPetr Hosek2016-12-121-0/+4
| | | | | | | | This currently gives a warning when building libcxx under runtimes. Differential Revision: https://reviews.llvm.org/D27643 llvm-svn: 289418
* Add check-cxx-abilist target when supported.Eric Fiselier2016-11-141-36/+25
| | | | | | | | | | | | | This patch adds a `check-cxx-abilist` target which verifies the libc++.so ABI when the current build configuration matches the configuration used to generate the ABI lists. In order to make this change `HandleOutOfTreeLLVM.cmake` needed to be modified to include `LLVMConfig.cmake` so that `TARGET_TRIPLE` is defined. Hopefully the changes needed to accommodate this won't break existing build configurations. llvm-svn: 286789
* [cmake] Allow testing against installed LLVM with no sourcesMichal Gorny2016-10-191-11/+6
| | | | | | | | | | | | Adjust the stand-alone build files to accept either CMake files from LLVM_CMAKE_PATH or from LLVM_MAIN_SRC_DIR instead of requiring both. This makes it possible to run libcxx tests on top of installed LLVM and lit, without having to unpack a copy of LLVM sources. Furthermore, it avoids adding duplicate paths. Differential Revision: https://reviews.llvm.org/D25093 llvm-svn: 284583
* Cleanup CMake status outputEric Fiselier2016-10-101-3/+0
| | | | llvm-svn: 283721
* [CMake] NFC. Missed the other uses in r280406Chris Bieneman2016-09-011-2/+2
| | | | | | Doh! Obviously need to slow down. llvm-svn: 280407
* [CMake] Don't copy headers on fully standaloneChris Bieneman2016-09-011-1/+9
| | | | | | | | In r280108 I tried to make the headers copy relative to LLVM_BINARY_DIR, and the intent was that it would only happen on in-tree builds or runtimes directory builds. It didn't actually work that way. This patch adds a check for CMAKE_SOURCE_DIR being equal to CMAKE_CURRENT_SOURCE_DIR. In this case we set a variable LIBCXX_USING_INSTLLED_LLVM. This doesn't necessarily mean the LLVM is installed (it could be a build directory), but it means we need to treat the LLVM directory as read-only. llvm-svn: 280400
* [CMake] Get libcxx building under LLVM/runtimesChris Bieneman2016-08-181-6/+8
| | | | | | | | | | | | | | | | | | | | | Summary: The new LLVM runtimes build directory requires some basic conventions across the runtime projects. These changes make libcxx build under the runtimes subdirectory. The general idea of the changes is that the runtimes subdirectory requires some conventions to be consistent across runtime projects. I expect to have a few more small patches that build on this to tie up check targets and other things useful in development workflows. Summary of changes in this patch: * Renamed variable LLVM_CONFIG -> LLVM_CONFIG_PATH * Renamed variable LIBCXX_BUILT_STANDALONE -> LIBCXX_STANDALONE_BUILD * Add an include of AddLLVM in the tests subdirectory for add_lit_testsuite. Reviewers: EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D23696 llvm-svn: 279151
* [CMake] Cleanup uses of USES_TERMINALChris Bieneman2016-06-081-8/+0
| | | | | | | | Now that we are on CMake 3.4.3 we no longer need a version check around this. This is the libcxx side of r272211. llvm-svn: 272212
* Fix the search path for CMake filesNiels Ole Salscheider2016-02-041-1/+1
| | | | | | | This allows to find the LLVM's CMake files after moving them in r259821. llvm-svn: 259842
* Revert r256606 due to compiler-rt sanitizer bot failuresEric Fiselier2015-12-301-31/+10
| | | | llvm-svn: 256614
* Cleanup CMake for out-of-tree buildsEric Fiselier2015-12-301-10/+31
| | | | llvm-svn: 256606
* [libcxx] Make libc++.so a linker script by default on most platforms.Eric Fiselier2015-10-151-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch turns on `LIBCXX_ENABLE_ABI_LINKER_SCRIPT` by default whenever `LLVM_HAVE_LINK_VERSION_SCRIPT` is ON. This turns out to be whenever: 1. WIN32 is not defined. 2 UNIX is defined. 3. APPLE is not defined. While `LLVM_HAVE_LINK_VERSION_SCRIPT` is meant to reflect exactly what we are asking I think it's close enough. After committing this patch Linux users will no longer have to use "-lc++abi" explicitly! Reviewers: mclow.lists, danalbert, compnerd, jroelofs Subscribers: emaste, rengolin, cbergstrom, cfe-commits Differential Revision: http://reviews.llvm.org/D13739 llvm-svn: 250469
* Fix default value for LLVM_INCLUDE_DOCS in out of tree build.Eric Fiselier2015-08-221-0/+3
| | | | llvm-svn: 245790
* [libcxx] Add new Sphinx documentationEric Fiselier2015-08-221-0/+11
| | | | | | | | | | | | | | | | | 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
* Fix CMake error whet llvm-config reports a non-existent source directory.Eric Fiselier2015-08-121-2/+6
| | | | llvm-svn: 244717
* Print message when configuring for standalone build.Eric Fiselier2015-07-311-0/+1
| | | | llvm-svn: 243737
* Reapply working parts of CMake cleanup.Eric Fiselier2015-07-301-0/+95
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
OpenPOWER on IntegriCloud