summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lldbtest.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index 4256e86d6fe..2baeb8ad399 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -1603,8 +1603,9 @@ class Base(unittest2.TestCase):
return path
# Tries to find clang at the same folder as the lldb
- path = os.path.join(os.path.dirname(lldbtest_config.lldbExec), "clang")
- if os.path.exists(path):
+ lldb_dir = os.path.dirname(lldbtest_config.lldbExec)
+ path = distutils.spawn.find_executable("clang", lldb_dir)
+ if path is not None:
return path
return os.environ["CC"]
OpenPOWER on IntegriCloud