-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[MLIR] Set LLVM_LIT_ARGS in Standalone Example CMake #152423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MLIR] Set LLVM_LIT_ARGS in Standalone Example CMake #152423
Conversation
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.
|
@llvm/pr-subscribers-mlir Author: Aiden Grossman (boomanaiden154) ChangesSetting 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. Full diff: https://github.com/llvm/llvm-project/pull/152423.diff 1 Files Affected:
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}")
|
marbre
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May I ask you to point me to the in-tree test for this example?
As folks may copy as this project as kind of a template is is unfortunate to set something we only need for an in-tree test as this might overlooked and not be removed in cases where it should later.
It is The issue reproduces for me with:
I agree it is unfortunate, I tried this: but it's not enough: the But that means that we likely should define it in the standalone project, so that users can override it on the command line! |
Co-authored-by: Mehdi Amini <[email protected]>
I didn't realize people copied this out to create their own projects. Thank you for the additional context there. Setting it explicitly to the default inside |
joker-eph
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG, thanks.
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.