Skip to content

Commit 90c478f

Browse files
committed
Add the target list to build-script --help.
Teach build-script to print the list of valid targets for the --stdlib-deployment-targets option. Unfortunately, passing all supported targets to this option is the only way to force configuration of those targets. Simply using --ios is no longer sufficient--none of the iOS targets are actually configured unless you ask them to be built. (The reasonable way to use a build config script is to first configure for all supported platforms, but only build the platforms/targets one by one when you actually need them). This currently prints: --stdlib-deployment-targets STDLIB_DEPLOYMENT_TARGETS The targets to compile or cross-compile the Swift standard library for. None by default. Comma separated list: android-aarch64 android-armv7 appletvos-arm64 appletvsimulator-x86_64 cygwin-x86_64 freebsd-x86_64 haiku-x86_64 iphoneos-arm64 iphoneos-armv7 iphoneos- armv7s iphonesimulator-i386 iphonesimulator-x86_64 linux-aarch64 linux-armv6 linux-armv7 linux-i686 linux-powerpc64 linux-powerpc64le linux-s390x linux- x86_64 macosx-x86_64 watchos-armv7k watchsimulator-i386 windows-x86_64
1 parent c3a08f0 commit 90c478f

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

utils/build_swift/build_swift/driver_arguments.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,10 @@ def create_argument_parser():
525525
option('--stdlib-deployment-targets', store,
526526
type=argparse.ShellSplitType(),
527527
default=None,
528-
help='list of targets to compile or cross-compile the Swift '
529-
'standard library for. %(default)s by default.')
528+
help='The targets to compile or cross-compile the Swift standard '
529+
'library for. %(default)s by default.'
530+
' Comma separated list: {}'.format(
531+
' '.join(StdlibDeploymentTarget.get_target_names())))
530532

531533
option('--build-stdlib-deployment-targets', store,
532534
type=argparse.ShellSplitType(),

utils/swift_build_support/swift_build_support/targets.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,11 @@ def get_target_for_name(cls, name):
244244
def get_targets_by_name(cls, names):
245245
return [cls.get_target_for_name(name) for name in names]
246246

247+
@classmethod
248+
def get_target_names(cls):
249+
return sorted([name for (name, target) in
250+
cls._targets_by_name.items()])
251+
247252

248253
def install_prefix():
249254
"""

0 commit comments

Comments
 (0)