scons: Pull Configure() to earlier in SConstruct so we can use it more.

This mechanism lets us check if headers are available, flags are
supported, etc. We should use that more often, rather than checking for
specific versions of tools where problematic new warnings were added, etc.

Change-Id: I5b1a6499147f27cc8944fcb8c61eb69e9fa8fb7a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40860
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Gabe Black
2021-02-07 01:41:27 -08:00
parent 205fe472ad
commit 9fa94642c4

View File

@@ -296,6 +296,10 @@ main['LTO_LDFLAGS'] = []
# compiler we're using.
main['TCMALLOC_CCFLAGS'] = []
# Platform-specific configuration. Note again that we assume that all
# builds under a given build root run on the same host platform.
conf = gem5_scons.Configure(main)
CXX_version = readCommand([main['CXX'],'--version'], exception=False)
CXX_V = readCommand([main['CXX'],'-V'], exception=False)
@@ -499,9 +503,6 @@ except Exception as e:
warning('While checking protoc version:', str(e))
main['HAVE_PROTOC'] = False
# Platform-specific configuration. Note again that we assume that all
# builds under a given build root run on the same host platform.
conf = gem5_scons.Configure(main)
# Cache build files in the supplied directory.
if main['M5_BUILD_CACHE']: