Skip to content

Commit 00d8381

Browse files
committed
Add extra-stdlib-deployment-targets to build-util
1 parent 20d9f21 commit 00d8381

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
@@ -585,6 +585,12 @@ def create_argument_parser():
585585
help='list of targets to compile or cross-compile the Swift '
586586
'standard library for. %(default)s by default.')
587587

588+
option('--extra-stdlib-deployment-targets', append,
589+
type=argparse.ShellSplitType(),
590+
default=None,
591+
help='list of additional targets to cross-compile the Swift standard '
592+
'library for in addition to default')
593+
588594
option('--build-stdlib-deployment-targets', store,
589595
type=argparse.ShellSplitType(),
590596
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',
@@ -510,6 +511,7 @@ class IgnoreOption(_BaseOption):
510511
AppendOption('--extra-cmake-options'),
511512
AppendOption('--extra-swift-args'),
512513
AppendOption('--stdlib-deployment-targets'),
514+
AppendOption('--extra-stdlib-deployment-targets'),
513515
AppendOption('--test-paths'),
514516

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

0 commit comments

Comments
 (0)