Skip to content

Commit 0cefaec

Browse files
author
Jinsong Ji
committed
[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
1 parent 96ef699 commit 0cefaec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler-rt/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,8 @@ add_subdirectory(lib)
544544
if(COMPILER_RT_INCLUDE_TESTS)
545545
add_subdirectory(unittests)
546546
add_subdirectory(test)
547-
if (COMPILER_RT_STANDALONE_BUILD)
547+
# Don't build llvm-lit for runtimes-build, it will clean up map_config.
548+
if (COMPILER_RT_STANDALONE_BUILD AND NOT RUNTIMES_BUILD)
548549
# If we have a valid source tree, generate llvm-lit into the bin directory.
549550
# The user can still choose to have the check targets *use* a different lit
550551
# by specifying -DLLVM_EXTERNAL_LIT, but we generate it regardless.

0 commit comments

Comments
 (0)