diff options
author | Eike Ziller <eike.ziller@qt.io> | 2021-04-21 12:49:09 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2021-04-21 12:18:25 +0000 |
commit | 9d8be9ce58a57b378a6247a6f666271059b47bb0 (patch) | |
tree | 24c14e00cddc9a04e1976af4ddfe3e73dcf2a830 /scripts | |
parent | 46fedb7697bde853dfe245504f68f80ad59218c2 (diff) |
build.py: Add option for 7z multi-threading behavior
Fixes: QTCREATORBUG-25590
Change-Id: I4234928cfd4e2d76afe5acf76cd53eb1d67fa5a0
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/scripts/build.py b/scripts/build.py index d779a33d44..b0a3d20a1c 100755 --- a/scripts/build.py +++ b/scripts/build.py @@ -108,6 +108,9 @@ def get_arguments(): action='append', dest='config_args', default=[]) parser.add_argument('--zip-infix', help='Adds an infix to generated zip files, use e.g. for a build number.', default='') + parser.add_argument('--zip-threads', help='Sets number of threads to use for 7z. Use "+" for turning threads on ' + 'without a specific number of threads. This is directly passed to the "-mmt" option of 7z.', + default='2') args = parser.parse_args() args.with_debug_info = args.build_type == 'RelWithDebInfo' @@ -247,26 +250,26 @@ def build_qtcreatorcdbext(args, paths): def package_qtcreator(args, paths): if not args.no_zip: if not args.no_qtcreator: - common.check_print_call(['7z', 'a', '-mmt2', + common.check_print_call(['7z', 'a', '-mmt' + args.zip_threads, os.path.join(paths.result, 'qtcreator' + args.zip_infix + '.7z'), '*'], paths.install) - common.check_print_call(['7z', 'a', '-mmt2', + common.check_print_call(['7z', 'a', '-mmt' + args.zip_threads, os.path.join(paths.result, 'qtcreator' + args.zip_infix + '_dev.7z'), '*'], paths.dev_install) if args.with_debug_info: - common.check_print_call(['7z', 'a', '-mmt2', + common.check_print_call(['7z', 'a', '-mmt' + args.zip_threads, os.path.join(paths.result, 'qtcreator' + args.zip_infix + '-debug.7z'), '*'], paths.debug_install) if common.is_windows_platform(): - common.check_print_call(['7z', 'a', '-mmt2', + common.check_print_call(['7z', 'a', '-mmt' + args.zip_threads, os.path.join(paths.result, 'wininterrupt' + args.zip_infix + '.7z'), '*'], paths.wininterrupt_install) if not args.no_cdb: - common.check_print_call(['7z', 'a', '-mmt2', + common.check_print_call(['7z', 'a', '-mmt' + args.zip_threads, os.path.join(paths.result, 'qtcreatorcdbext' + args.zip_infix + '.7z'), '*'], paths.qtcreatorcdbext_install) |