[Lldb-commits] [lldb] [lldb] Make TestJitBreakPoint.py use LLVM_TOOLS_DIR (PR #171656)
Aiden Grossman via lldb-commits
lldb-commits at lists.llvm.org
Wed Dec 10 09:34:51 PST 2025
https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/171656
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.
>From fda61d83c4cdaa47885ae29d487c1a4b6066e1ba Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Wed, 10 Dec 2025 17:32:45 +0000
Subject: [PATCH] [lldb] Make TestJitBreakPoint.py use LLVM_TOOLS_DIR
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.
---
.../jit_loader_rtdyld_elf/TestJitBreakPoint.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
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)
More information about the lldb-commits
mailing list