mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
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:
@@ -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
|
||||||
|
|||||||
@@ -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++',
|
||||||
|
|||||||
17
common.py
17
common.py
@@ -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']
|
||||||
|
|||||||
Reference in New Issue
Block a user