From 3763a9c696e43cd7d829f1f7a278a4c0f1daa7cd 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: Tue, 22 Jan 2019 00:00:00 +0000 Subject: [PATCH] gem5: --gem5-worktree also set --gem5-build-id --- common.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/common.py b/common.py index 6672baa..5853cc2 100644 --- a/common.py +++ b/common.py @@ -162,14 +162,16 @@ mkdir are generally omitted since those are obvious self.add_argument( '--gem5-build-dir', help='''\ -Use the given directory as the gem5 build directory. Ignore --gem5-build-id and --gem5-build-type. +Use the given directory as the gem5 build directory. +Ignore --gem5-build-id and --gem5-build-type. ''' ) self.add_argument( - '-M', '--gem5-build-id', default='default', + '-M', '--gem5-build-id', help='''\ gem5 build ID. Allows you to keep multiple separate gem5 builds. -''' +Default: {} +'''.format(consts['default_build_id']) ) self.add_argument( '--gem5-build-type', default='opt', @@ -340,8 +342,11 @@ Use gem5 instead of QEMU. Shortcut for `--emulator gem5`. env['userland_build_id_given'] = False else: env['userland_build_id_given'] = True - if env['gem5_worktree'] is not None and env['gem5_build_id'] is None: - env['gem5_build_id'] = env['gem5_worktree'] + if env['gem5_build_id'] is None: + if env['gem5_worktree'] is not None: + env['gem5_build_id'] = env['gem5_worktree'] + else: + env['gem5_build_id'] = consts['default_build_id'] env['is_arm'] = False if env['arch'] == 'arm': env['armv'] = 7