scons: Allow clean non-interactive builds

On a clean build, the git tool will wait for input() before installing
git hooks. Allow bypassing this via a command-line flag, making it
possible to perform a clean build non-interactively.

Bug: 199780674
Test: build_gem5 --install-hooks
Change-Id: I48be2c1a7c2335a2f4f6359adf582ca8b0ae5939
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50410
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Eric Ye
2021-09-15 09:54:18 -07:00
parent fac84c1fe5
commit e61f62b478
2 changed files with 11 additions and 5 deletions

View File

@@ -123,6 +123,8 @@ AddOption('--with-asan', action='store_true',
help='Build with Address Sanitizer if available')
AddOption('--with-systemc-tests', action='store_true',
help='Build systemc tests')
AddOption('--install-hooks', action='store_true',
help='Install revision control hooks non-interactively')
# Imports of gem5_scons happen here since it depends on some options which are
# declared above.