[compiler-rt] Don't build llvm-lit in RUNTIMES-BUILD

With runtimes-build, we lost map config for llvm-lit, so we can NOT run
lit from source dir anymore.
All the subdir target like: ninja check-llvm-codegen-powerpc will fail
too.

We will get some cfg error like:
  File "../lvm-project/llvm/test/lit.cfg.py", line 21, in <module>
    config.test_format = lit.formats.ShTest(not llvm_config.use_lit_shell)
AttributeError: 'NoneType' object has no attribute 'use_lit_shell'

This is reset of map config in llvm-lit rebuild.
We already have llvm-lit in runtimes-build, so don't build it.

Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D87002
This commit is contained in:
Jinsong Ji 2020-09-02 20:41:15 +00:00
parent 96ef6998df
commit 0cefaec2e8
1 changed files with 2 additions and 1 deletions

View File

@ -544,7 +544,8 @@ add_subdirectory(lib)
if(COMPILER_RT_INCLUDE_TESTS)
add_subdirectory(unittests)
add_subdirectory(test)
if (COMPILER_RT_STANDALONE_BUILD)
# Don't build llvm-lit for runtimes-build, it will clean up map_config.
if (COMPILER_RT_STANDALONE_BUILD AND NOT RUNTIMES_BUILD)
# If we have a valid source tree, generate llvm-lit into the bin directory.
# The user can still choose to have the check targets *use* a different lit
# by specifying -DLLVM_EXTERNAL_LIT, but we generate it regardless.