Replace —print-build-dir with --dump-config

The --dump-config option prints a recursive JSON dump of the BuildScriptInvocation object’s properties, which gives access to essentially all of the knowledge build-script has about the build before it starts performing it. This makes the output more flexible and extensible without severely convoluting the implementation, but doesn’t really give us a stable representation of that data.
This commit is contained in:
Brent Royal-Gordon
2019-05-19 20:58:14 -07:00
parent b38834621a
commit af7e2da9ca
3 changed files with 23 additions and 10 deletions

View File

@@ -287,6 +287,10 @@ def create_argument_parser():
option(['-n', '--dry-run'], store_true,
help='print the commands that would be executed, but do not '
'execute them')
option('--dump-config', toggle_true,
help='instead of building, write JSON to stdout containing '
'various values used to build in this configuration')
option('--legacy-impl', store_true('legacy_impl'),
help='use legacy implementation')
@@ -333,8 +337,6 @@ def create_argument_parser():
metavar='PATH',
help='name of the directory under $SWIFT_BUILD_ROOT where the '
'build products will be placed')
option('--print-build-dir', toggle_true,
help='print the build directory and exit without building')
option('--install-prefix', store_path,
default=targets.install_prefix(),
help='The installation prefix. This is where built Swift products '