scons: Add "--no-duplicate-sources" option to SConstruct in util/
Patch [1] caused building util/m5 to fail due to the flag was not an option in the SConstruct file. It is apparently the case for other programs in util/ relying on scons. This patch fixes the above problem, and also adheres to the default behavior introduced by [2]. [1] This patch introduced the "--no-duplicate-sources" flag to the scons build in util/ https://gem5-review.googlesource.com/c/public/gem5/+/68518 [2] This patch turns this flag off by default, https://gem5-review.googlesource.com/c/public/gem5/+/69717 Change-Id: I51376f7b3bf06438b7bc7ff84bc599deecac5bd1 Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69797 Maintainer: Bobby Bruce <bbruce@ucdavis.edu> Reviewed-by: Alex Richardson <alexrichardson@google.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Ayaz Akram <yazakram@ucdavis.edu>
This commit is contained in:
@@ -49,6 +49,9 @@ AddOption('--debug-build', dest='debug_build', action='store_true',
|
||||
AddOption('--run-tests', dest='run_tests', action='store_true',
|
||||
help='Enable test output xml files as build targets.')
|
||||
AddOption('--verbose', dest='verbose', action='store_true')
|
||||
AddOption('--no-duplicate-sources', action='store_false', default=True,
|
||||
dest='duplicate_sources',
|
||||
help='Do not create symlinks to sources in the build directory')
|
||||
|
||||
# Universal settings.
|
||||
if GetOption('debug_build'):
|
||||
|
||||
@@ -57,6 +57,12 @@ main['CXXFLAGS'] = "-O3 -ggdb $_CPPINCFLAGS"
|
||||
|
||||
main['CXX'] = ARGUMENTS.get('CXX', main['CXX'])
|
||||
|
||||
# An option not to link source files in the build directory.
|
||||
# Not enabled by default.
|
||||
AddOption('--no-duplicate-sources', action='store_false', default=True,
|
||||
dest='duplicate_sources',
|
||||
help='Do not create symlinks to sources in the build directory')
|
||||
|
||||
for arch in arches:
|
||||
env = main.Clone()
|
||||
env['CXX'] = ARGUMENTS.get(arch.upper() + 'CXX', env['CXX'])
|
||||
|
||||
@@ -80,6 +80,12 @@ sys.path.append(gem5_root + '/src/python')
|
||||
AddOption('--no-colors', dest='use_colors', action='store_false',
|
||||
help="Don't add color to abbreviated scons output")
|
||||
|
||||
# An option not to link source files in the build directory.
|
||||
# Not enabled by default.
|
||||
AddOption('--no-duplicate-sources', action='store_false', default=True,
|
||||
dest='duplicate_sources',
|
||||
help='Do not create symlinks to sources in the build directory')
|
||||
|
||||
env.SConsignFile('build/systemc/sconsign')
|
||||
SConscript(gem5_root + '/ext/systemc/SConscript',
|
||||
variant_dir='build/systemc',
|
||||
|
||||
Reference in New Issue
Block a user