From e75e363cb71a7339552b9d943e78ac62b737379b Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 13 Jul 2017 19:26:17 +0000 Subject: Vendor import of lldb trunk r307894: https://llvm.org/svn/llvm-project/lldb/trunk@307894 --- packages/Python/lldbsuite/test/lldbplatformutil.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'packages/Python/lldbsuite/test/lldbplatformutil.py') diff --git a/packages/Python/lldbsuite/test/lldbplatformutil.py b/packages/Python/lldbsuite/test/lldbplatformutil.py index 89ce1d468bd0..4f45643241ed 100644 --- a/packages/Python/lldbsuite/test/lldbplatformutil.py +++ b/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.""" -- cgit v1.2.3