[flang-commits] [flang] 07b0665 - [Flang] Support overriding `LLVM_LIT_ARGS` in standalone builds (#127340)

via flang-commits flang-commits at lists.llvm.org
Sat Feb 15 11:50:18 PST 2025


Author: Michał Górny
Date: 2025-02-15T19:50:14Z
New Revision: 07b0665d284f3d953dc74fae594102f9d3e81cb2

URL: https://github.com/llvm/llvm-project/commit/07b0665d284f3d953dc74fae594102f9d3e81cb2
DIFF: https://github.com/llvm/llvm-project/commit/07b0665d284f3d953dc74fae594102f9d3e81cb2.diff

LOG: [Flang] Support overriding `LLVM_LIT_ARGS` in standalone builds (#127340)

Declare `LLVM_LIT_ARGS` as a cache variable in standalone builds to
permit overriding it. This mirrors the logic used in Clang.

Added: 
    

Modified: 
    flang/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/flang/CMakeLists.txt b/flang/CMakeLists.txt
index c012b884ae3be..0f98d12343c43 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