- This uses more Clang/Swift-style diagnostics, and adds a convenient wrapper
`fatal()` which happens to match what almost all clients of the previous
`print_with_argv0` wanted to do (i.e., fail with a fatal error).
- As part of this, I also tried to make the diagnostics more consistent and use
"diagnostic style" casing/punctuation.
- Part of SR-237.
If -n or --dry-run is specified in command line arguments, print the commands
that would be executed to stdout, but do not execute them.
Supported in build-script and build-toolchain.
utils/build-script -n -Rt
utils/build-script -n --preset=buildbot_incremental,tools=RA,stdlib=RA
utils/build-toolchain -n local.swift
- Use consistent terminology for target platforms, disambiguate uses of
'deployment_target' in to 'host' and 'stdlib_targets'
- Changed parameters to build script:
- install-prefix no longer has to include toolchain-prefix on OSX
- swift-sdks has been replaced by stdlib-deployment-targets
- built-stdlib-deployment-targets lets you restrict which of the
stdlib-deployment targets are built
- Calculate stdlib_targets per host, to facilitate future cross-compiling
- Only use executables from LOCAL_HOST
- Only execute testable targets of the LOCAL_HOST
- Remove some cases of switching on 'uname' to facilitate future
cross-compiling
Strictly separate "argument tweak" and "build-script-lmpl args generation"
* tweak `args` - set default, propagate default
* (Do something in `build-script`)
* build `build_script_impl_args`
- Get it to work as `build-script` arguments.
- Fixed quoting problem
- Replaced --user-config-args: Error for --user-config-args.
- Moved to the position where it can override any options
Before, we have to explicitly specify migrated args:
migrate_impl_args(argv, [... migrated arg list ...])
This change makes all *unknown* arguments to be automatically forwarded to
'build-script-impl'.
- Update the documentation to reflect that Swift supports (only)
the latest NDK version. Based on what I've heard from Android
developers that use the NDK, this is a reasonable requirement.
- The most recent version of the Android NDK no longer includes a
"4.8" toolchain version. Change the default to "4.9", and update
the paths in the documentation to match.
- The build script option "--android-ndk-version" was misleading.
This parameter actually refers to the Android API level. Swift
currently supports 21 (Android 5.0) and above (although supporting
lower API levels would be desirable).
This fixes a regression from PR #2213.
We needed a way to disable testing in a preset, even though previous
flags already requested tests. So I added an argument to the '--test'
and '--validation-test' flags. The argparse module treats '-T' and
'--validation-test' the same, so it thinks that in -RTi the 'i' is an
argument to '-T'.
* The behavior of `build-script -t` is unchanged.
* `build-script -T` continues to run primary and validation test suite,
but without the long tests.
* `build-script --long-test` runs just the long tests.
* `build-script -T --long-test` runs all tests.
I've only implemented this for OS X, which comes with the
'caffeinate' command. If anyone would like to implement
something similar for Linux, feel free. (Although please
make sure that it's signal-safe, i.e. if the build is
interrupted the computer's sleep settings return to normal.)