From 9fa94642c41a2133a9b6b964da399382ec19812a Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sun, 7 Feb 2021 01:41:27 -0800 Subject: [PATCH] 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 Maintainer: Gabe Black Tested-by: kokoro --- SConstruct | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/SConstruct b/SConstruct index 1485a36a8..d64842425 100755 --- a/SConstruct +++ b/SConstruct @@ -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']: -- 2.30.2