qemu: allow turning -O0 debug build on or off, use -O0 by default

OMG, I was wasting time in ARM all along!!!
This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-08-28 00:00:00 +00:00
parent 4ff62c4840
commit eee6c825c3
3 changed files with 57 additions and 41 deletions

View File

@@ -26,14 +26,19 @@ class Main(common.BuildCliFunction):
target_list = '{}-linux-user'.format(self.env['arch'])
else:
target_list = '{}-softmmu'.format(self.env['arch'])
if self.env['qemu_build_type'] == 'debug':
# https://stackoverflow.com/questions/4689136/debug-qemu-with-gdb
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-debug', 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