-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Add the target list to build-script --help. #29283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@swift-ci test |
'standard library for. %(default)s by default.') | ||
help='The targets to compile or cross-compile the Swift standard ' | ||
'library for. %(default)s by default. Comma separated list: '+ | ||
" ".join(StdlibDeploymentTarget.get_target_names())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use single quotes for string literals to keep the style consistent. And avoid string concatenation in this case:
help='The targets to compile or cross-compile the Swift standard '
'library for. %(default)s by default. Comma separated list: '
' '.join(StdlibDeploymentTarget.get_target_names()))
Python has a nifty feature that automatically concatenates string literals that appear sequentially with only whitespace between them:
'Hello, ' 'world!' # => 'Hello, world!'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need a different string literal for the join. Is this ok?
help='The targets to compile or cross-compile the Swift standard '
'library for. %(default)s by default. Comma separated list: '
+ ' '.join(StdlibDeploymentTarget.get_target_names()))
'standard library for. %(default)s by default.') | ||
help='The targets to compile or cross-compile the Swift standard ' | ||
'library for. %(default)s by default. Comma separated list: ' | ||
+ ' '.join(StdlibDeploymentTarget.get_target_names())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't need this +
here. Just indent the statement to keep it inline with the ones above and try running python utils/python_lint.py
and python -m unittest discover -s utils/build_swift -t utils/
to make sure the tests pass. Likely you need to add a new test case to utils/build_swift/tests/expected_options.py
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. It is nicer to look at with a trailing .format
instead of concatenation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the record, lint and python unittest both pass.
@swift-ci smoke test |
Those both run as part of "test" and "smoke test" so we'd know soon enough. But thanks for running them before hand! |
@swift-ci smoke test |
Teach build-script to print the list of valid targets for the --stdlib-deployment-targets option. Unfortunately, passing all supported targets to this option is the only way to force configuration of those targets. Simply using --ios is no longer sufficient--none of the iOS targets are actually configured unless you ask them to be built. (The reasonable way to use a build config script is to first configure for all supported platforms, but only build the platforms/targets one by one when you actually need them). This currently prints: --stdlib-deployment-targets STDLIB_DEPLOYMENT_TARGETS The targets to compile or cross-compile the Swift standard library for. None by default. Comma separated list: android-aarch64 android-armv7 appletvos-arm64 appletvsimulator-x86_64 cygwin-x86_64 freebsd-x86_64 haiku-x86_64 iphoneos-arm64 iphoneos-armv7 iphoneos- armv7s iphonesimulator-i386 iphonesimulator-x86_64 linux-aarch64 linux-armv6 linux-armv7 linux-i686 linux-powerpc64 linux-powerpc64le linux-s390x linux- x86_64 macosx-x86_64 watchos-armv7k watchsimulator-i386 windows-x86_64
@swift-ci smoke test |
Teach build-script to print the list of valid targets for the
--stdlib-deployment-targets option. Unfortunately, passing all
supported targets to this option is the only way to force
configuration of those targets. Simply using --ios is no longer
sufficient--none of the iOS targets are actually configured unless you
ask them to be built.
(The reasonable way to use a build config script is to first configure
for all supported platforms, but only build the platforms/targets one
by one when you actually need them).
This currently prints:
--stdlib-deployment-targets STDLIB_DEPLOYMENT_TARGETS
The targets to compile or cross-compile the Swift
standard library for. None by default. Comma separated
list: android-aarch64 android-armv7 appletvos-arm64
appletvsimulator-x86_64 cygwin-x86_64 freebsd-x86_64
haiku-x86_64 iphoneos-arm64 iphoneos-armv7 iphoneos-
armv7s iphonesimulator-i386 iphonesimulator-x86_64
linux-aarch64 linux-armv6 linux-armv7 linux-i686
linux-powerpc64 linux-powerpc64le linux-s390x linux-
x86_64 macosx-x86_64 watchos-armv7k
watchsimulator-i386 windows-x86_64