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 <shunhsingou@google.com> Maintainer: Gabe Black <gabe.black@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -94,6 +94,7 @@ from re import match
|
||||
import SCons
|
||||
import SCons.Node
|
||||
import SCons.Node.FS
|
||||
import SCons.Tool
|
||||
|
||||
from m5.util import compareVersions, readCommand, readCommandWithReturn
|
||||
|
||||
@@ -137,6 +138,9 @@ import gem5_scons
|
||||
|
||||
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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user