mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
common: add --configure to make configure optional on build
This commit is contained in:
26
build-qemu
26
build-qemu
@@ -8,6 +8,7 @@ from shell_helpers import LF
|
|||||||
class Main(common.BuildCliFunction):
|
class Main(common.BuildCliFunction):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
self._add_argument('--configure')
|
||||||
self.add_argument(
|
self.add_argument(
|
||||||
'extra_config_args',
|
'extra_config_args',
|
||||||
default=[],
|
default=[],
|
||||||
@@ -31,18 +32,19 @@ class Main(common.BuildCliFunction):
|
|||||||
build_type_cmd = ['--enable-debug', LF]
|
build_type_cmd = ['--enable-debug', LF]
|
||||||
else:
|
else:
|
||||||
build_type_cmd = []
|
build_type_cmd = []
|
||||||
self.sh.run_cmd(
|
if self.env['configure']:
|
||||||
[
|
self.sh.run_cmd(
|
||||||
os.path.join(self.env['qemu_source_dir'], 'configure'), LF,
|
[
|
||||||
'--enable-trace-backends=simple', LF,
|
os.path.join(self.env['qemu_source_dir'], 'configure'), LF,
|
||||||
'--target-list={}'.format(target_list), LF,
|
'--enable-trace-backends=simple', LF,
|
||||||
'--enable-sdl', LF,
|
'--target-list={}'.format(target_list), LF,
|
||||||
] +
|
'--enable-sdl', LF,
|
||||||
build_type_cmd +
|
] +
|
||||||
self.sh.add_newlines(self.env['extra_config_args']),
|
build_type_cmd +
|
||||||
extra_paths=[self.env['ccache_dir']],
|
self.sh.add_newlines(self.env['extra_config_args']),
|
||||||
cwd=build_dir
|
extra_paths=[self.env['ccache_dir']],
|
||||||
)
|
cwd=build_dir
|
||||||
|
)
|
||||||
self.sh.run_cmd(
|
self.sh.run_cmd(
|
||||||
(
|
(
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -1588,6 +1588,12 @@ Pass the given compiler flags to all languages (C, C++, Fortran, etc.)
|
|||||||
'default': False,
|
'default': False,
|
||||||
"help": '''\
|
"help": '''\
|
||||||
Force rebuild even if sources didn't change.
|
Force rebuild even if sources didn't change.
|
||||||
|
''',
|
||||||
|
},
|
||||||
|
'--configure': {
|
||||||
|
'default': True,
|
||||||
|
"help": '''\
|
||||||
|
Also run the configuration step during build.
|
||||||
''',
|
''',
|
||||||
},
|
},
|
||||||
'--optimization-level': {
|
'--optimization-level': {
|
||||||
|
|||||||
Reference in New Issue
Block a user