diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lldbplatformutil.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lldbplatformutil.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py b/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py index 89ce1d468bd..4f45643241e 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py +++ b/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py @@ -8,6 +8,7 @@ import itertools import re import subprocess import sys +import os # Third-party modules import six @@ -140,6 +141,19 @@ def platformIsDarwin(): return getPlatform() in getDarwinOSTriples() +def findMainThreadCheckerDylib(): + if not platformIsDarwin(): + return "" + + with os.popen('xcode-select -p') as output: + xcode_developer_path = output.read().strip() + mtc_dylib_path = '%s/usr/lib/libMainThreadChecker.dylib' % xcode_developer_path + if os.path.isfile(mtc_dylib_path): + return mtc_dylib_path + + return "" + + class _PlatformContext(object): """Value object class which contains platform-specific options.""" |