Skip to content

Conversation

@boomanaiden154
Copy link
Contributor

This seems the standard way to get the path to such tools within LLVM. Calling findBuiltClang() has some annoying behavior like falling back to CC when it cannot find anything else, which might point to anything or not even be set.

We noticed this with our internal build system as the lli binary is not in the same path as the clang binary.

This seems the standard way to get the path to such tools within LLVM.
Calling findBuiltClang() has some annoying behavior like falling back to
CC when it cannot find anything else, which might point to anything or
not even be set.

We noticed this with our internal build system as the lli binary is not
in the same path as the clang binary.
@llvmbot
Copy link
Member

llvmbot commented Dec 10, 2025

@llvm/pr-subscribers-lldb

Author: Aiden Grossman (boomanaiden154)

Changes

This seems the standard way to get the path to such tools within LLVM. Calling findBuiltClang() has some annoying behavior like falling back to CC when it cannot find anything else, which might point to anything or not even be set.

We noticed this with our internal build system as the lli binary is not in the same path as the clang binary.


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

1 Files Affected:

  • (modified) lldb/test/API/functionalities/breakpoint/jit_loader_rtdyld_elf/TestJitBreakPoint.py (+6-3)
diff --git a/lldb/test/API/functionalities/breakpoint/jit_loader_rtdyld_elf/TestJitBreakPoint.py b/lldb/test/API/functionalities/breakpoint/jit_loader_rtdyld_elf/TestJitBreakPoint.py
index 92f233a7638de..bc77794130484 100644
--- a/lldb/test/API/functionalities/breakpoint/jit_loader_rtdyld_elf/TestJitBreakPoint.py
+++ b/lldb/test/API/functionalities/breakpoint/jit_loader_rtdyld_elf/TestJitBreakPoint.py
@@ -5,6 +5,7 @@
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
+from lldbsuite.test import configuration
 
 
 class TestJitBreakpoint(TestBase):
@@ -20,9 +21,11 @@ def test_jit_breakpoints(self):
     def do_test(self, jit_flag: str):
         self.runCmd("settings set plugin.jit-loader.gdb.enable on")
 
-        clang_path = self.findBuiltClang()
-        self.assertTrue(clang_path, "built clang could not be found")
-        lli_path = os.path.join(os.path.dirname(clang_path), "lli")
+        self.assertIsNotNone(
+            configuration.llvm_tools_dir,
+            "llvm_tools_dir must be set to find lli",
+        )
+        lli_path = os.path.join(os.path.join(configuration.llvm_tools_dir, "lli"))
         self.assertTrue(lldbutil.is_exe(lli_path), f"'{lli_path}' is not an executable")
         self.runCmd(f"target create {lli_path}", CURRENT_EXECUTABLE_SET)
 

@charles-zablit
Copy link
Contributor

Thanks!

@boomanaiden154 boomanaiden154 merged commit 49324cd into llvm:main Dec 10, 2025
10 of 11 checks passed
@boomanaiden154 boomanaiden154 deleted the lldb-test-jit-breakpoint-tools-dir branch December 10, 2025 17:56
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.

4 participants