From 33ff7bbd61cae1ee435bdebb63f64e15a725d22e Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 13 Apr 2023 16:14:04 +0300 Subject: [PATCH] scripts: waifulib: compiler_optimizations: set default build type to release I think this will make configuration less confusing, also we're stable enough to be built with optimizations and without debug information --- scripts/waifulib/compiler_optimizations.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/waifulib/compiler_optimizations.py b/scripts/waifulib/compiler_optimizations.py index 218e99fe..9cc81b7c 100644 --- a/scripts/waifulib/compiler_optimizations.py +++ b/scripts/waifulib/compiler_optimizations.py @@ -118,7 +118,7 @@ POLLY_CFLAGS = { def options(opt): grp = opt.add_option_group('Compiler optimization options') - grp.add_option('-T', '--build-type', action='store', dest='BUILD_TYPE', default=None, + grp.add_option('-T', '--build-type', action='store', dest='BUILD_TYPE', default='release', help = 'build type: debug, release or none(custom flags)') grp.add_option('--enable-lto', action = 'store_true', dest = 'LTO', default = False, @@ -129,12 +129,11 @@ def options(opt): def configure(conf): conf.start_msg('Build type') - if conf.options.BUILD_TYPE == None: - conf.end_msg('not set', color='RED') - conf.fatal('Set a build type, for example "-T release"') - elif not conf.options.BUILD_TYPE in VALID_BUILD_TYPES: + + if not conf.options.BUILD_TYPE in VALID_BUILD_TYPES: conf.end_msg(conf.options.BUILD_TYPE, color='RED') conf.fatal('Invalid build type. Valid are: %s' % ', '.join(VALID_BUILD_TYPES)) + conf.end_msg(conf.options.BUILD_TYPE) conf.msg('LTO build', 'yes' if conf.options.LTO else 'no')