[Lldb-commits] [lldb] [lldb][test] Don't treat 'xcrun clang' as a path for finding clang++ (PR #188235)

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 25 01:20:58 PDT 2026


================
@@ -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):
----------------
Teemperor wrote:

(Updated the commit/PR description with more info) Various tests pass `xcrun clang` to the `build` function as a test compiler to work around the fact that some tested functionality is only in downstream clang. `TestPrintObjectArray.py` is further trying to compile an Objective-C++ (instead of Objective-C) source which ends up triggering this code path.

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


More information about the lldb-commits mailing list