diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake --- a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake +++ b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake @@ -263,7 +263,7 @@ ERROR_QUIET) if (HAD_ERROR) message(WARNING "llvm-config finding testingsupport failed with status ${HAD_ERROR}") - else() + elseif(COMPILER_RT_INCLUDE_TESTS) string(REGEX REPLACE "[ \t]*[\r\n]+[ \t]*" ";" CONFIG_OUTPUT ${CONFIG_OUTPUT}) list(GET CONFIG_OUTPUT 0 LDFLAGS) list(GET CONFIG_OUTPUT 1 LIBLIST)