Skip to content

Commit 5d3e8b5

Browse files
authored
Merge pull request swiftlang#29283 from atrick/show-build-targets
Add the target list to build-script --help.
2 parents 73e69c8 + 90c478f commit 5d3e8b5

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)