[gem5-dev] [S] Change in gem5/gem5[develop]: scons: Add "--no-duplicate-sources" option to SConstruct in util/

2023-04-13 Thread Hoa Nguyen (Gerrit) via gem5-dev
Hoa Nguyen has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/69797?usp=email )


Change subject: scons: Add "--no-duplicate-sources" option to SConstruct in  
util/

..

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 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69797
Maintainer: Bobby Bruce 
Reviewed-by: Alex Richardson 
Tested-by: kokoro 
Reviewed-by: Ayaz Akram 
---
M util/m5/SConstruct
M util/statetrace/SConstruct
M util/tlm/SConstruct
3 files changed, 15 insertions(+), 0 deletions(-)

Approvals:
  kokoro: Regressions pass
  Alex Richardson: Looks good to me, but someone else must approve
  Bobby Bruce: Looks good to me, approved
  Ayaz Akram: Looks good to me, approved




diff --git a/util/m5/SConstruct b/util/m5/SConstruct
index c2c4a50..7f07b94 100644
--- a/util/m5/SConstruct
+++ b/util/m5/SConstruct
@@ -49,6 +49,9 @@
 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'):
diff --git a/util/statetrace/SConstruct b/util/statetrace/SConstruct
index 945976e..2e1a631 100644
--- a/util/statetrace/SConstruct
+++ b/util/statetrace/SConstruct
@@ -57,6 +57,12 @@

 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'])
diff --git a/util/tlm/SConstruct b/util/tlm/SConstruct
index 6c65cfd..3f4abf8 100644
--- a/util/tlm/SConstruct
+++ b/util/tlm/SConstruct
@@ -80,6 +80,12 @@
 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',

--
To view, visit  
https://gem5-review.googlesource.com/c/public/gem5/+/69797?usp=email
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I51376f7b3bf06438b7bc7ff84bc599deecac5bd1
Gerrit-Change-Number: 69797
Gerrit-PatchSet: 3
Gerrit-Owner: Hoa Nguyen 
Gerrit-Reviewer: Alex Richardson 
Gerrit-Reviewer: Ayaz Akram 
Gerrit-Reviewer: Bobby Bruce 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Hoa Nguyen 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org


[gem5-dev] [S] Change in gem5/gem5[develop]: scons: Add "--no-duplicate-sources" option to SConstruct in util/

2023-04-13 Thread Hoa Nguyen (Gerrit) via gem5-dev
Hoa Nguyen has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/69797?usp=email )



Change subject: scons: Add "--no-duplicate-sources" option to SConstruct in  
util/

..

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 enabled this flag by default,
https://gem5-review.googlesource.com/c/public/gem5/+/69717

Change-Id: I51376f7b3bf06438b7bc7ff84bc599deecac5bd1
Signed-off-by: Hoa Nguyen 
---
M util/m5/SConstruct
M util/statetrace/SConstruct
M util/tlm/SConstruct
3 files changed, 15 insertions(+), 0 deletions(-)



diff --git a/util/m5/SConstruct b/util/m5/SConstruct
index c2c4a50..7f07b94 100644
--- a/util/m5/SConstruct
+++ b/util/m5/SConstruct
@@ -49,6 +49,9 @@
 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'):
diff --git a/util/statetrace/SConstruct b/util/statetrace/SConstruct
index 945976e..2e1a631 100644
--- a/util/statetrace/SConstruct
+++ b/util/statetrace/SConstruct
@@ -57,6 +57,12 @@

 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'])
diff --git a/util/tlm/SConstruct b/util/tlm/SConstruct
index 6c65cfd..3f4abf8 100644
--- a/util/tlm/SConstruct
+++ b/util/tlm/SConstruct
@@ -80,6 +80,12 @@
 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',

--
To view, visit  
https://gem5-review.googlesource.com/c/public/gem5/+/69797?usp=email
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I51376f7b3bf06438b7bc7ff84bc599deecac5bd1
Gerrit-Change-Number: 69797
Gerrit-PatchSet: 1
Gerrit-Owner: Hoa Nguyen 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org