Skip to content

Commit 43ee2db

Browse files
committed
Add extra-stdlib-deployment-targets to build-util
1 parent 7f5aa2e commit 43ee2db

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

utils/build-script

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,12 @@ class BuildScriptInvocation(object):
269269
args.stdlib_deployment_targets = [
270270
target.name for target in stdlib_targets]
271271

272+
# Additional stdlib targets if we want to still build the default
273+
# deployment targets as well.
274+
if args.extra_stdlib_deployment_targets is not None:
275+
args.stdlib_deployment_targets += \
276+
args.extra_stdlib_deployment_targets
277+
272278
# SwiftPM and XCTest have a dependency on Foundation.
273279
# On OS X, Foundation is built automatically using xcodebuild.
274280
# On Linux, we must ensure that it is built manually.

utils/build_swift/driver_arguments.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,12 @@ def create_argument_parser():
590590
help='list of targets to compile or cross-compile the Swift '
591591
'standard library for. %(default)s by default.')
592592

593+
option('--extra-stdlib-deployment-targets', append,
594+
type=argparse.ShellSplitType(),
595+
default=None,
596+
help='list of additional targets to cross-compile the Swift standard '
597+
'library for in addition to default')
598+
593599
option('--build-stdlib-deployment-targets', store,
594600
type=argparse.ShellSplitType(),
595601
default=['all'],

utils/build_swift/tests/expected_options.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
'enable_ubsan': False,
120120
'export_compile_commands': False,
121121
'extra_cmake_options': [],
122+
'extra_stdlib_deployment_targets': None,
122123
'extra_swift_args': [],
123124
'force_optimized_typechecker': False,
124125
'foundation_build_variant': 'Debug',
@@ -512,6 +513,7 @@ class IgnoreOption(_BaseOption):
512513
AppendOption('--extra-cmake-options'),
513514
AppendOption('--extra-swift-args'),
514515
AppendOption('--stdlib-deployment-targets'),
516+
AppendOption('--extra-stdlib-deployment-targets'),
515517
AppendOption('--test-paths'),
516518

517519
UnsupportedOption('--build-jobs'),

0 commit comments

Comments
 (0)