Skip to content

Commit 6c183c8

Browse files
committed
[Apple Silicon] [Build] Generalize macOS architecture check
1 parent e24f7df commit 6c183c8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

utils/swift_build_support/swift_build_support/host_specific_configuration.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#
1111
# ----------------------------------------------------------------------------
1212

13+
import re
1314
import sys
1415
from argparse import ArgumentError
1516

@@ -155,11 +156,13 @@ def __init__(self, host_target, args):
155156

156157
# Support for running the macCatalyst tests with
157158
# the iOS-like target triple.
158-
if name == "macosx-x86_64" and args.maccatalyst \
159+
macosx_platform_match = re.search("macosx-(.*)", name)
160+
if macosx_platform_match and args.maccatalyst \
159161
and args.maccatalyst_ios_tests:
160162
(self.swift_test_run_targets
161-
.append("check-swift{}{}-{}".format(
162-
subset_suffix, suffix, "macosx-maccatalyst-x86_64")))
163+
.append("check-swift{}{}-{}-{}".format(
164+
subset_suffix, suffix, "macosx-maccatalyst",
165+
macosx_platform_match.group(1))))
163166
else:
164167
(self.swift_test_run_targets
165168
.append("check-swift{}{}-{}".format(

0 commit comments

Comments
 (0)