From 5fa57faa13d58ea9c463a0c90e8437eca530e330 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Thu, 7 Aug 2025 01:24:10 +0000 Subject: [PATCH 1/3] [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 Date: Fri, 15 Aug 2025 10:12:10 -0700 Subject: [PATCH 2/3] Update mlir/examples/standalone/CMakeLists.txt Co-authored-by: Mehdi Amini --- 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}") From 6ea71544c9c1944c4eb5df0ad7f9cf9f70125d72 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Fri, 15 Aug 2025 17:27:49 +0000 Subject: [PATCH 3/3] Formatting --- mlir/examples/standalone/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mlir/examples/standalone/CMakeLists.txt b/mlir/examples/standalone/CMakeLists.txt index cde53502c294f..42b487fe2d40f 100644 --- a/mlir/examples/standalone/CMakeLists.txt +++ b/mlir/examples/standalone/CMakeLists.txt @@ -9,8 +9,8 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) find_package(MLIR REQUIRED CONFIG) - # Define the default argument to use by `lit` when testing. - set(LLVM_LIT_ARGS "-sv" CACHE STRING "Default options for lit") + # 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}")