From e9b04504612e4740d2eb54084f333cb745555400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciro=20Santilli=20=E5=85=AD=E5=9B=9B=E4=BA=8B=E4=BB=B6=20?= =?UTF-8?q?=E6=B3=95=E8=BD=AE=E5=8A=9F?= Date: Fri, 27 Dec 2019 00:00:00 +0000 Subject: [PATCH] common: add --configure to make configure optional on build --- build-qemu | 26 ++++++++++++++------------ common.py | 6 ++++++ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/build-qemu b/build-qemu index 8298999..8b814ba 100755 --- a/build-qemu +++ b/build-qemu @@ -8,6 +8,7 @@ from shell_helpers import LF class Main(common.BuildCliFunction): def __init__(self): super().__init__() + self._add_argument('--configure') self.add_argument( 'extra_config_args', default=[], @@ -31,18 +32,19 @@ class Main(common.BuildCliFunction): build_type_cmd = ['--enable-debug', LF] else: build_type_cmd = [] - self.sh.run_cmd( - [ - os.path.join(self.env['qemu_source_dir'], 'configure'), LF, - '--enable-trace-backends=simple', LF, - '--target-list={}'.format(target_list), LF, - '--enable-sdl', LF, - ] + - build_type_cmd + - self.sh.add_newlines(self.env['extra_config_args']), - extra_paths=[self.env['ccache_dir']], - cwd=build_dir - ) + if self.env['configure']: + self.sh.run_cmd( + [ + os.path.join(self.env['qemu_source_dir'], 'configure'), LF, + '--enable-trace-backends=simple', LF, + '--target-list={}'.format(target_list), LF, + '--enable-sdl', LF, + ] + + build_type_cmd + + self.sh.add_newlines(self.env['extra_config_args']), + extra_paths=[self.env['ccache_dir']], + cwd=build_dir + ) self.sh.run_cmd( ( [ diff --git a/common.py b/common.py index bfd41f1..47c7cfa 100644 --- a/common.py +++ b/common.py @@ -1588,6 +1588,12 @@ Pass the given compiler flags to all languages (C, C++, Fortran, etc.) 'default': False, "help": '''\ Force rebuild even if sources didn't change. +''', + }, + '--configure': { + 'default': True, + "help": '''\ +Also run the configuration step during build. ''', }, '--optimization-level': {