diff options
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lldbtest.py | 5 |
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"] |