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

Jinsong Ji via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 2 18:08:32 PDT 2020


Author: Jinsong Ji
Date: 2020-09-03T01:08:16Z
New Revision: 0cefaec2e876182313826bd13d5b9f8f3623622f

URL: https://github.com/llvm/llvm-project/commit/0cefaec2e876182313826bd13d5b9f8f3623622f
DIFF: https://github.com/llvm/llvm-project/commit/0cefaec2e876182313826bd13d5b9f8f3623622f.diff

LOG: [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

Added: 
    

Modified: 
    compiler-rt/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt
index c7e86946bcf3..0a0294f937db 100644
--- a/compiler-rt/CMakeLists.txt
+++ b/compiler-rt/CMakeLists.txt
@@ -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 
diff erent lit
     # by specifying -DLLVM_EXTERNAL_LIT, but we generate it regardless.


        


More information about the llvm-commits mailing list