Skip to content

Conversation

@Luohaothu
Copy link
Contributor

Related to #121288

This PR fixes the miscopied config.lldb_build_directory variable in lit.cfg.py inside MLIR's test suit. config.mlir_obj_root is used as a replacement for the copied python executable's directory.

PS: Since this is a common work-around on macOS, should we promote it as a utility across projects?

@llvmbot llvmbot added the mlir label Jan 11, 2025
@llvmbot
Copy link
Member

llvmbot commented Jan 11, 2025

@llvm/pr-subscribers-mlir

Author: Luohao Wang (Luohaothu)

Changes

Related to #121288

This PR fixes the miscopied config.lldb_build_directory variable in lit.cfg.py inside MLIR's test suit. config.mlir_obj_root is used as a replacement for the copied python executable's directory.

PS: Since this is a common work-around on macOS, should we promote it as a utility across projects?


Full diff: https://github.com/llvm/llvm-project/pull/122596.diff

1 Files Affected:

  • (modified) mlir/test/lit.cfg.py (+1-1)
diff --git a/mlir/test/lit.cfg.py b/mlir/test/lit.cfg.py
index f162f9a00efa7c..c28623123d9991 100644
--- a/mlir/test/lit.cfg.py
+++ b/mlir/test/lit.cfg.py
@@ -106,7 +106,7 @@ def find_real_python_interpreter():
     if sys.prefix != sys.base_prefix:
         copied_python = os.path.join(sys.prefix, "bin", "copied-python")
     else:
-        copied_python = os.path.join(config.lldb_build_directory, "copied-python")
+        copied_python = os.path.join(config.mlir_obj_root, "copied-python")
 
     # Avoid doing any work if we already copied the binary.
     if os.path.isfile(copied_python):

@github-actions
Copy link

⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo.
Please turn off Keep my email addresses private setting in your account.
See LLVM Discourse for more information.

@Luohaothu
Copy link
Contributor Author

@joker-eph Hi Mehdi, could you help review this PR?

Copy link
Member

@Lewuathe Lewuathe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me. Thanks for the fix!

@Lewuathe Lewuathe linked an issue Jan 15, 2025 that may be closed by this pull request
@Luohaothu
Copy link
Contributor Author

@Lewuathe Thanks for the review! Could you merge this PR? I don't have write access.

@Lewuathe
Copy link
Member

I'll merge this one once the buildkite passes.

@Lewuathe Lewuathe merged commit f79bacb into llvm:main Jan 16, 2025
8 checks passed
@Luohaothu Luohaothu deleted the lit-fix branch January 16, 2025 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MLIR] [macOS] Cannot build check-mlir on macOS

3 participants