common: rename --clang to --gem5-clang

The option was hard to understand, and this would cause ambiguity
if we ever support something else with the same option, e.g. rootfs
or userland executables.
This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-11-14 00:00:00 +00:00
parent ed602152b3
commit 3808df4175
3 changed files with 11 additions and 12 deletions

View File

@@ -12399,8 +12399,8 @@ TODO test properly, benchmark vs GCC.
.... ....
sudo apt-get install clang sudo apt-get install clang
./build-gem5 --clang ./build-gem5 --gem5-clang
./run --clang --emulator gem5 ./run --emulator gem5 --gem5-clang
.... ....
==== gem5 sanitation build ==== gem5 sanitation build

View File

@@ -117,7 +117,7 @@ https://github.com/cirosantilli/linux-kernel-module-cheat-regression#gem5-unit-t
targets = [self.env['gem5_unit_test_target']] targets = [self.env['gem5_unit_test_target']]
else: else:
targets = [self.env['gem5_executable']] targets = [self.env['gem5_executable']]
if self.env['clang']: if self.env['gem5_clang']:
extra_env = { extra_env = {
'CC': 'clang', 'CC': 'clang',
'CXX': 'clang++', 'CXX': 'clang++',

View File

@@ -216,14 +216,6 @@ CPU architecture to use. If given multiple times, run the action
for each arch sequentially in that order. If one of them fails, stop running. for each arch sequentially in that order. If one of them fails, stop running.
Valid archs: {} Valid archs: {}
'''.format(arches_string) '''.format(arches_string)
)
self.add_argument(
'--clang',
default=False,
help='''\
Build with clang as much as possible. Set the build-id to clang by default unless
one is given explicitly. Currently supported components: gem5.
'''
) )
self.add_argument( self.add_argument(
'--dry-run', '--dry-run',
@@ -343,6 +335,13 @@ Default: {}
default=consts['build_type_default'], default=consts['build_type_default'],
help='gem5 build type, most often used for "debug" builds.' help='gem5 build type, most often used for "debug" builds.'
) )
self.add_argument(
'--gem5-clang',
default=False,
help='''\
Build gem5 with clang and set the --gem5-build-id to 'clang' by default.
'''
)
self.add_argument( self.add_argument(
'--gem5-source-dir', '--gem5-source-dir',
help='''\ help='''\
@@ -678,7 +677,7 @@ Incompatible archs are skipped.
if not env['_args_given']['gem5_build_id']: if not env['_args_given']['gem5_build_id']:
if env['_args_given']['gem5_worktree']: if env['_args_given']['gem5_worktree']:
env['gem5_build_id'] = env['gem5_worktree'] env['gem5_build_id'] = env['gem5_worktree']
elif env['_args_given']['clang']: elif env['_args_given']['gem5-clang']:
env['gem5_build_id'] = 'clang' env['gem5_build_id'] = 'clang'
else: else:
env['gem5_build_id'] = consts['default_build_id'] env['gem5_build_id'] = consts['default_build_id']