[Mlir-commits] [mlir] [MLIR] Set LLVM_LIT_ARGS in Standalone Example CMake (PR #152423)
Aiden Grossman
llvmlistbot at llvm.org
Fri Aug 15 10:12:31 PDT 2025
https://github.com/boomanaiden154 updated https://github.com/llvm/llvm-project/pull/152423
>From 5fa57faa13d58ea9c463a0c90e8437eca530e330 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Thu, 7 Aug 2025 01:24:10 +0000
Subject: [PATCH 1/2] [MLIR] Set LLVM_LIT_ARGS in Standalone Example CMake
Setting LLVM_LIT_ARGS to include --quiet and then running check-mlir in
a standard checkout will otherwise cause test failures here because
LLVM_LIT_ARGS gets propagated into this project.
---
mlir/examples/standalone/CMakeLists.txt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/mlir/examples/standalone/CMakeLists.txt b/mlir/examples/standalone/CMakeLists.txt
index 038242ba1437a..6df956ce97b17 100644
--- a/mlir/examples/standalone/CMakeLists.txt
+++ b/mlir/examples/standalone/CMakeLists.txt
@@ -8,6 +8,11 @@ set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to conform to")
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
find_package(MLIR REQUIRED CONFIG)
+ # Explictily set LLVM_LIT_ARGS so that the in-tree test for this example
+ # will get the expected output regardless of the value of LLVM_LIT_ARGS
+ # in the main LLVM build.
+ set(LLVM_LIT_ARGS "")
+
message(STATUS "Using MLIRConfig.cmake in: ${MLIR_DIR}")
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
>From 9c3112319b7cefc5bcf480858f80ab7d18669dfa Mon Sep 17 00:00:00 2001
From: Aiden Grossman <agrossman154 at yahoo.com>
Date: Fri, 15 Aug 2025 10:12:10 -0700
Subject: [PATCH 2/2] Update mlir/examples/standalone/CMakeLists.txt
Co-authored-by: Mehdi Amini <joker.eph at gmail.com>
---
mlir/examples/standalone/CMakeLists.txt | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/mlir/examples/standalone/CMakeLists.txt b/mlir/examples/standalone/CMakeLists.txt
index 6df956ce97b17..cde53502c294f 100644
--- a/mlir/examples/standalone/CMakeLists.txt
+++ b/mlir/examples/standalone/CMakeLists.txt
@@ -8,10 +8,9 @@ set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to conform to")
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
find_package(MLIR REQUIRED CONFIG)
- # Explictily set LLVM_LIT_ARGS so that the in-tree test for this example
- # will get the expected output regardless of the value of LLVM_LIT_ARGS
- # in the main LLVM build.
- set(LLVM_LIT_ARGS "")
+
+ # Define the default argument to use by `lit` when testing.
+ set(LLVM_LIT_ARGS "-sv" CACHE STRING "Default options for lit")
message(STATUS "Using MLIRConfig.cmake in: ${MLIR_DIR}")
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
More information about the Mlir-commits
mailing list