From 3808df417558c12e40f7489a720f30713ae1ad92 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: Thu, 14 Nov 2019 00:00:00 +0000 Subject: [PATCH] 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. --- README.adoc | 4 ++-- build-gem5 | 2 +- common.py | 17 ++++++++--------- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/README.adoc b/README.adoc index a298c06..44aca26 100644 --- a/README.adoc +++ b/README.adoc @@ -12399,8 +12399,8 @@ TODO test properly, benchmark vs GCC. .... sudo apt-get install clang -./build-gem5 --clang -./run --clang --emulator gem5 +./build-gem5 --gem5-clang +./run --emulator gem5 --gem5-clang .... ==== gem5 sanitation build diff --git a/build-gem5 b/build-gem5 index 5ab0306..3e321b5 100755 --- a/build-gem5 +++ b/build-gem5 @@ -117,7 +117,7 @@ https://github.com/cirosantilli/linux-kernel-module-cheat-regression#gem5-unit-t targets = [self.env['gem5_unit_test_target']] else: targets = [self.env['gem5_executable']] - if self.env['clang']: + if self.env['gem5_clang']: extra_env = { 'CC': 'clang', 'CXX': 'clang++', diff --git a/common.py b/common.py index ee9ffb6..b4d06d3 100644 --- a/common.py +++ b/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. Valid archs: {} '''.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( '--dry-run', @@ -343,6 +335,13 @@ Default: {} default=consts['build_type_default'], 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( '--gem5-source-dir', help='''\ @@ -678,7 +677,7 @@ Incompatible archs are skipped. if not env['_args_given']['gem5_build_id']: if env['_args_given']['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' else: env['gem5_build_id'] = consts['default_build_id']