@@ -249,6 +249,13 @@ class BuildScriptInvocation(object):
249
249
if args .build_variant is None :
250
250
args .build_variant = "Debug"
251
251
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
+
252
259
# Propagate the default build variant.
253
260
if args .cmark_build_variant is None :
254
261
args .cmark_build_variant = args .build_variant
@@ -1206,15 +1213,12 @@ details of the setups of other systems or automated environments.""")
1206
1213
"tools for. Can be used multiple times." ,
1207
1214
action = arguments .action .concat , type = arguments .type .shell_split ,
1208
1215
default = [])
1209
- stdlib_targets = StdlibDeploymentTarget .default_stdlib_deployment_targets ()
1210
1216
targets_group .add_argument (
1211
1217
"--stdlib-deployment-targets" ,
1212
1218
help = "list of targets to compile or cross-compile the Swift standard "
1213
1219
"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 )
1218
1222
targets_group .add_argument (
1219
1223
"--build-stdlib-deployment-targets" ,
1220
1224
help = "A space-separated list that filters which of the configured "
0 commit comments