Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/41673 )
Change subject: scons: Enable the clang++ and clang tools.
......................................................................
scons: Enable the clang++ and clang tools.
If these tools aren't enabled and CXX isn't set, scons will look for
generically named compiler aliases like cc and c++. These will generally
work, but if scons knows that the compiler is specifically clang, it
will set the CXXCONFIG variable we can use to do compiler version
checking.
Because scons blindly forces a tool into use if you specify it, we need
to use the FindTool method which will check a list of tools and add the
first one that it actually finds.
Change-Id: Ie6bebb8eab531989575c878bee07189541756d2c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41673
Reviewed-by: Earl Ou <[email protected]>
Maintainer: Gabe Black <[email protected]>
Tested-by: kokoro <[email protected]>
---
M SConstruct
1 file changed, 4 insertions(+), 0 deletions(-)
Approvals:
Earl Ou: Looks good to me, approved
Gabe Black: Looks good to me, approved
kokoro: Regressions pass
diff --git a/SConstruct b/SConstruct
index 19a5da9..c5dac00 100755
--- a/SConstruct
+++ b/SConstruct
@@ -94,6 +94,7 @@
import SCons
import SCons.Node
import SCons.Node.FS
+import SCons.Tool
from m5.util import compareVersions, readCommand, readCommandWithReturn
@@ -137,6 +138,9 @@
main = Environment(tools=['default', 'git', TempFileSpawn])
+main.Tool(SCons.Tool.FindTool(['gcc', 'clang'], main))
+main.Tool(SCons.Tool.FindTool(['g++', 'clang++'], main))
+
from gem5_scons.util import get_termcap
termcap = get_termcap()
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/41673
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: Ie6bebb8eab531989575c878bee07189541756d2c
Gerrit-Change-Number: 41673
Gerrit-PatchSet: 4
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Earl Ou <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s