[Mlir-commits] [mlir] f79bacb - [mlir] [Python] Fix misused `lldb_build_directory` in MLIR's test script (#122596)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Jan 15 18:28:47 PST 2025


Author: Luohao Wang
Date: 2025-01-16T11:28:43+09:00
New Revision: f79bacb485bfb2d12bc0a223cc35d2e5fb75fbf7

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

LOG: [mlir] [Python] Fix misused `lldb_build_directory` in MLIR's test script (#122596)

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?

Co-authored-by: Luohao Wang <Luohaothu at users.noreply.github.com>
Co-authored-by: Kai Sasaki <lewuathe at gmail.com>

Added: 
    

Modified: 
    mlir/test/lit.cfg.py

Removed: 
    


################################################################################
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):


        


More information about the Mlir-commits mailing list