[flang-commits] [flang] [Flang] Support overriding `LLVM_LIT_ARGS` in standalone builds (PR #127340)
Michał Górny via flang-commits
flang-commits at lists.llvm.org
Sat Feb 15 10:38:14 PST 2025
https://github.com/mgorny created https://github.com/llvm/llvm-project/pull/127340
Declare `LLVM_LIT_ARGS` as a cache variable in standalone builds to permit overriding it. This mirrors the logic used in Clang.
>From 21b8139fabb35741314fb7b7d5550fc794f1fa68 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny at gentoo.org>
Date: Sat, 15 Feb 2025 19:36:50 +0100
Subject: [PATCH] [Flang] Support overriding `LLVM_LIT_ARGS` in standalone
builds
Declare `LLVM_LIT_ARGS` as a cache variable in standalone builds
to permit overriding it. This mirrors the logic used in Clang.
---
flang/CMakeLists.txt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/flang/CMakeLists.txt b/flang/CMakeLists.txt
index cca56bfdc88e6..cea1755f97be5 100644
--- a/flang/CMakeLists.txt
+++ b/flang/CMakeLists.txt
@@ -199,6 +199,11 @@ if (FLANG_STANDALONE_BUILD)
${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")
+ endif()
+ set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}" CACHE STRING "Default options for lit")
option(FLANG_INCLUDE_TESTS
"Generate build targets for the Flang unit tests."
More information about the flang-commits
mailing list