llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Raphael Isemann (Teemperor)

<details>
<summary>Changes</summary>

TestPrintObjectArray.py currently runs `clang++` when compiling the test 
source, even though we specified that the test source should be compiled with 
`xcrun clang`. We end up in this situation as we treat this command as a path 
when trying to assemble the `clang++` command.

This patch just adds a special case that if the path is not a file path or 
symlink, then we assembly the `clang++` command by just appending the extension 
to the command.

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


1 Files Affected:

- (modified) lldb/packages/Python/lldbsuite/test/builders/builder.py (+6-1) 


``````````diff
diff --git a/lldb/packages/Python/lldbsuite/test/builders/builder.py 
b/lldb/packages/Python/lldbsuite/test/builders/builder.py
index 024c9f1c7e435..7ad9658303823 100644
--- a/lldb/packages/Python/lldbsuite/test/builders/builder.py
+++ b/lldb/packages/Python/lldbsuite/test/builders/builder.py
@@ -159,7 +159,12 @@ def getToolchainSpec(self, compiler):
         def getToolchainUtil(util_name):
             return os.path.join(configuration.llvm_tools_dir, util_name + 
exe_ext)
 
-        cxx = cc_dir / (cc_prefix + cxx_type + cc_ext)
+        # If the compiler is a file path or symlink, try to infer where the
+        # C++ variant is. Otherwise just append the extension (usually '++').
+        if os.path.exists(cc):
+            cxx = cc_dir / (cc_prefix + cxx_type + cc_ext)
+        else:
+            cxx = cc + cc_ext
 
         util_names = {
             "OBJCOPY": "objcopy",

``````````

</details>


https://github.com/llvm/llvm-project/pull/188235
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to