[flang-commits] [flang] [Flang][CMake] Use LLVM-declared LLVM_EXTERNAL_LIT (PR #208680)
Michael Kruse via flang-commits
flang-commits at lists.llvm.org
Fri Jul 10 03:01:20 PDT 2026
https://github.com/Meinersbur created https://github.com/llvm/llvm-project/pull/208680
LLVM_EXTERNAL_LIT is already declared by https://github.com/llvm/llvm-project/blob/99fb741b6e0da866bf3c6000531104bff347d787/llvm/cmake/modules/AddLLVM.cmake#L2175. Flang's redeclaration in standalone build is redundant and breaks on Windows because the filename is `llvm-lit.py` one Windows.
>From 85eeebfa7f0dc2039648d065600a6f01171359af Mon Sep 17 00:00:00 2001
From: Michael Kruse <llvm-project at meinersbur.de>
Date: Thu, 9 Jul 2026 15:36:59 +0200
Subject: [PATCH] No need to declare LLVM_EXTERNAL_LIT ourselves
---
flang/CMakeLists.txt | 1 -
1 file changed, 1 deletion(-)
diff --git a/flang/CMakeLists.txt b/flang/CMakeLists.txt
index 42a7031c37fe9..bd3ce6d6b6ff5 100644
--- a/flang/CMakeLists.txt
+++ b/flang/CMakeLists.txt
@@ -216,7 +216,6 @@ if (FLANG_STANDALONE_BUILD)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY
${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX})
- set(LLVM_EXTERNAL_LIT "${LLVM_TOOLS_BINARY_DIR}/llvm-lit" CACHE STRING "Command used to spawn lit")
set(LIT_ARGS_DEFAULT "-sv")
if (MSVC OR XCODE)
set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} --no-progress-bar")
More information about the flang-commits
mailing list