From 4350401b5b8a9be2d44d4154aeb953bf989ac4b4 Mon Sep 17 00:00:00 2001 From: Akos Kiss Date: Fri, 8 Jan 2021 16:01:06 +0100 Subject: [PATCH] Add --build-type to tools/build.py (#4409) This allows users to specify a build type other than `MinSizeRel` or `Debug` for `tools/build.py`. (Build type was already freely configurable by invoking cmake directly with a custom `CMAKE_BUILD_TYPE` option.) JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu --- tools/build.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/build.py b/tools/build.py index 3667fd139..fa310c59b 100755 --- a/tools/build.py +++ b/tools/build.py @@ -63,8 +63,10 @@ def get_arguments(): help='add custom argument to CMake') buildgrp.add_argument('--compile-flag', metavar='OPT', action='append', default=[], help='add custom compile flag') - buildgrp.add_argument('--debug', action='store_const', const='Debug', dest='build_type', - default='MinSizeRel', help='debug build') + buildgrp.add_argument('--build-type', metavar='TYPE', default='MinSizeRel', + help='set build type (default: %(default)s)') + buildgrp.add_argument('--debug', dest='build_type', action='store_const', const='Debug', default=argparse.SUPPRESS, + help='debug build (alias for --build-type %(const)s)') buildgrp.add_argument('--install', metavar='DIR', nargs='?', default=None, const=False, help='install after build (default: don\'t install; ' 'default directory if install: OS-specific)')