Skip to content

Commit 3e593b9

Browse files
kendalharlandkendal
andauthored
[lldb] Remove python helper getCompilerBinary() (#100660)
This causes a number of tests be `UNRESOLVED` on Windows if `getCompiler()` has a space in the name, because `getCompilerBinary()` unconditionally splits on whitespace and returns the first result, which might just be`"C:\Program"` if using a compiler such as `clang-cl` `cl` from the absolute path to Visual studio's installation directory. Co-authored-by: kendal <[email protected]>
1 parent 599a91a commit 3e593b9

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

lldb/packages/Python/lldbsuite/test/lldbplatformutil.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -266,17 +266,13 @@ def getCompiler():
266266
return module.getCompiler()
267267

268268

269-
def getCompilerBinary():
270-
"""Returns the compiler binary the test suite is running with."""
271-
return getCompiler().split()[0]
272-
273-
274269
def getCompilerVersion():
275270
"""Returns a string that represents the compiler version.
276271
Supports: llvm, clang.
277272
"""
278-
compiler = getCompilerBinary()
279-
version_output = subprocess.check_output([compiler, "--version"], errors="replace")
273+
version_output = subprocess.check_output(
274+
[getCompiler(), "--version"], errors="replace"
275+
)
280276
m = re.search("version ([0-9.]+)", version_output)
281277
if m:
282278
return m.group(1)

lldb/packages/Python/lldbsuite/test/lldbtest.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,10 +1379,6 @@ def getCompiler(self):
13791379
"""Returns the compiler in effect the test suite is running with."""
13801380
return lldbplatformutil.getCompiler()
13811381

1382-
def getCompilerBinary(self):
1383-
"""Returns the compiler binary the test suite is running with."""
1384-
return lldbplatformutil.getCompilerBinary()
1385-
13861382
def getCompilerVersion(self):
13871383
"""Returns a string that represents the compiler version.
13881384
Supports: llvm, clang.

0 commit comments

Comments
 (0)