Skip to content

Commit

Permalink
[lldb] Fix TestAppleSimulatorOSType for older watchOS SDKs
Browse files Browse the repository at this point in the history
Older watchOS SDKs *only* support i386 so we can't use x86_64/arm64
unconditionally.
  • Loading branch information
JDevlieghere committed Mar 27, 2021
1 parent 5079bc8 commit 38edd23
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lldb/test/API/tools/lldb-server/TestAppleSimulatorOSType.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,17 @@ def check_simulator_ostype(self, sdk, platform_name, arch=platform.machine()):

# Launch the process using simctl
self.assertIsNotNone(deviceUDID)

exe_name = 'test_simulator_platform_{}'.format(platform_name)
sdkroot = lldbutil.get_xcode_sdk_root(sdk)
vers = lldbutil.get_xcode_sdk_version(sdk)

# Older versions of watchOS (<7.0) only support i386
if platform_name == 'watchos':
from distutils.version import LooseVersion
if LooseVersion(vers) < LooseVersion("7.0"):
arch = 'i386'

triple = '-'.join([arch, 'apple', platform_name + vers, 'simulator'])
version_min = '-m{}-simulator-version-min={}'.format(platform_name, vers)
self.build(
Expand Down

0 comments on commit 38edd23

Please sign in to comment.