Files
linux-kernel-module-cheat/build-qemu
Ciro Santilli 六四事件 法轮功 75a555daa8 common: print cd pdw on paths
print only modified variables on PATH

use common.run_cmd everywhere to get full bash bash commands

readme: recommend private/ instead of the cryptic p/
2018-09-27 00:00:00 +00:00

48 lines
1.2 KiB
Python
Executable File

#!/usr/bin/env python3
import multiprocessing
import os
import subprocess
import time
import common
parser = common.get_argparse()
common.add_build_arguments(parser)
parser.add_argument(
'extra_config_args',
default=[],
metavar='extra-config-args',
nargs='*'
)
args = common.setup(parser)
if args.clean:
common.rmrf(common.qemu_build_dir)
else:
start_time = time.time()
os.makedirs(common.qemu_build_dir, exist_ok=True)
assert common.run_cmd(
[
os.path.join(common.qemu_src_dir, 'configure'),
'--enable-debug',
'--enable-trace-backends=simple',
'--target-list={}-softmmu'.format(args.arch),
'--enable-sdl',
'--with-sdlabi=2.0',
] +
args.extra_config_args,
extra_paths=[common.ccache_dir],
cwd=common.qemu_build_dir
) == 0
assert common.run_cmd(
[
'make',
# TODO factor with build.
'-j', str(multiprocessing.cpu_count()),
],
cwd=common.qemu_build_dir,
extra_paths=[common.ccache_dir],
) == 0
end_time = time.time()
common.print_time(end_time - start_time)