Bobby Bruce has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/69717?usp=email )
Change subject: scons: Fix "no-duplicate-sources" to include .hh when not
set
......................................................................
scons: Fix "no-duplicate-sources" to include .hh when not set
A flag, introduced in this patch:
https://gem5-review.googlesource.com/c/public/gem5/+/68518
allowed users to pass "no-duplicate-sources" to a gem5 compilation to
not simlink sources in the build directory.
In this patch "src" was added as a shared top-level header directory.
This means that the header files are not copied to the "build" directory
whether or not "no-duplicate-sources" is set.
This patch ensures the "src" directory is only added as a shared
top-level headers directory in the case where "no-duplicate-sources" is
set.
In addition, the "duplicate_sources" parameter (the destination for the
"no-duplicate-sources" was "None" by default, and only set to False when
the flag was used. `default=True` has been added so "duplicate_sources"
can be used as a boolean.
This bug was a cause of a Nightly build error:
https://jenkins.gem5.org/job/nightly/570
In this error, building ext/sst resulted in an error as the Makefile
depends on adding "build/RISCV" to the include path. Without the header
files in the "build" directory, building SST failed. Though, ext/stt
should probably not be using header files in the "build/RISCV"
directory. This will be fixed in another change.
Change-Id: I786486a177fe17a67f3b939c539eecdcbfcaeaf2
---
M SConstruct
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/SConstruct b/SConstruct
index e91e700..7e8f177 100755
--- a/SConstruct
+++ b/SConstruct
@@ -145,7 +145,7 @@
help='Enable support for the gprof profiler')
AddOption('--pprof', action='store_true',
help='Enable support for the pprof profiler')
-AddOption('--no-duplicate-sources', action='store_false',
+AddOption('--no-duplicate-sources', action='store_false', default=True,
dest='duplicate_sources',
help='Do not create symlinks to sources in the build directory')
@@ -267,7 +267,8 @@
# Add shared top-level headers
main.Prepend(CPPPATH=Dir('include'))
-main.Prepend(CPPPATH=Dir('src'))
+if not GetOption('duplicate_sources'):
+ main.Prepend(CPPPATH=Dir('src'))
########################################################################
--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/69717?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: I786486a177fe17a67f3b939c539eecdcbfcaeaf2
Gerrit-Change-Number: 69717
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby Bruce <bbr...@ucdavis.edu>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org