Skip to content

Commit cc69924

Browse files
committed
[build-script] Support concatenated stdlib-deployment-targets.
- This fixes a regression introduced in a4537e8, where we used to accept a list of concatenated deployment targets as a single argument. - <rdar://problem/26928189> build-script fails to split deployment targets before iterating over them
1 parent b169cb5 commit cc69924

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

utils/build-script

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,13 @@ class BuildScriptInvocation(object):
249249
if args.build_variant is None:
250250
args.build_variant = "Debug"
251251

252+
# Set the default stdlib-deployment-targets, if none were provided.
253+
if args.stdlib_deployment_targets is None:
254+
stdlib_targets = \
255+
StdlibDeploymentTarget.default_stdlib_deployment_targets()
256+
args.stdlib_deployment_targets = [
257+
target.name for target in stdlib_targets]
258+
252259
# Propagate the default build variant.
253260
if args.cmark_build_variant is None:
254261
args.cmark_build_variant = args.build_variant
@@ -1206,15 +1213,12 @@ details of the setups of other systems or automated environments.""")
12061213
"tools for. Can be used multiple times.",
12071214
action=arguments.action.concat, type=arguments.type.shell_split,
12081215
default=[])
1209-
stdlib_targets = StdlibDeploymentTarget.default_stdlib_deployment_targets()
12101216
targets_group.add_argument(
12111217
"--stdlib-deployment-targets",
12121218
help="list of targets to compile or cross-compile the Swift standard "
12131219
"library for. %(default)s by default.",
1214-
nargs="*",
1215-
default=[
1216-
target.name
1217-
for target in stdlib_targets])
1220+
action=arguments.action.concat, type=arguments.type.shell_split,
1221+
default=None)
12181222
targets_group.add_argument(
12191223
"--build-stdlib-deployment-targets",
12201224
help="A space-separated list that filters which of the configured "

0 commit comments

Comments
 (0)