Skip to content

Commit 49324cd

Browse files
[lldb] Make TestJitBreakPoint.py use LLVM_TOOLS_DIR (llvm#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.
1 parent 28ff941 commit 49324cd

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lldb/test/API/functionalities/breakpoint/jit_loader_rtdyld_elf/TestJitBreakPoint.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import lldb
66
from lldbsuite.test.decorators import *
77
from lldbsuite.test.lldbtest import *
8+
from lldbsuite.test import configuration
89

910

1011
class TestJitBreakpoint(TestBase):
@@ -20,9 +21,11 @@ def test_jit_breakpoints(self):
2021
def do_test(self, jit_flag: str):
2122
self.runCmd("settings set plugin.jit-loader.gdb.enable on")
2223

23-
clang_path = self.findBuiltClang()
24-
self.assertTrue(clang_path, "built clang could not be found")
25-
lli_path = os.path.join(os.path.dirname(clang_path), "lli")
24+
self.assertIsNotNone(
25+
configuration.llvm_tools_dir,
26+
"llvm_tools_dir must be set to find lli",
27+
)
28+
lli_path = os.path.join(os.path.join(configuration.llvm_tools_dir, "lli"))
2629
self.assertTrue(lldbutil.is_exe(lli_path), f"'{lli_path}' is not an executable")
2730
self.runCmd(f"target create {lli_path}", CURRENT_EXECUTABLE_SET)
2831

0 commit comments

Comments
 (0)