diff options
author | Zachary Turner <zturner@google.com> | 2017-09-15 22:10:46 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-09-15 22:10:46 +0000 |
commit | a0f1ea32df562bd3397047159ecad7eaea5d9bf8 (patch) | |
tree | aec6f6681011e41a4fdd62faf8bfe3909c21f1bb /CMakeLists.txt | |
parent | 5461cbf32f0945943dab2f08a94ea42e81c78bdb (diff) |
Resubmit "[lit] Force site configs to run before source-tree configs"
This is a resubmission of r313270. It broke standalone builds of
compiler-rt because we were not correctly generating the llvm-lit
script in the standalone build directory.
The fixes incorporated here attempt to find llvm/utils/llvm-lit
from the source tree returned by llvm-config. If present, it
will generate llvm-lit into the output directory. Regardless,
the user can specify -DLLVM_EXTERNAL_LIT to point to a specific
lit.py on their file system. This supports the use case of
someone installing lit via a package manager. If it cannot find
a source tree, and -DLLVM_EXTERNAL_LIT is either unspecified or
invalid, then we print a warning that tests will not be able
to run.
Differential Revision: https://reviews.llvm.org/D37756
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313407 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d08fd67ddaf..76d66b99fc8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -845,7 +845,6 @@ if( LLVM_INCLUDE_UTILS ) add_subdirectory(utils/PerfectShuffle) add_subdirectory(utils/count) add_subdirectory(utils/not) - add_subdirectory(utils/llvm-lit) add_subdirectory(utils/yaml-bench) else() if ( LLVM_INCLUDE_TESTS ) @@ -932,6 +931,11 @@ endif() add_subdirectory(cmake/modules) +# Do this last so that all lit targets have already been created. +if (LLVM_INCLUDE_UTILS) + add_subdirectory(utils/llvm-lit) +endif() + if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) install(DIRECTORY include/llvm include/llvm-c DESTINATION include |