scons,gpu: Use a config header for the BUILD_GPU setting.
The BUILD_GPU setting was being set by adding a -D to the command line at the top level SConstruct. Instead, add BUILD_GPU to export_vars so that it ends up in a config/build_gpu.hh header. Also switch it from the fairly dangerous #ifdef style to the safer #if. Change-Id: Ic93d37c9d7671023a6978842dbb2750c3e92f8d8 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40873 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:
@@ -809,8 +809,8 @@ sticky_vars.AddVariables(
|
||||
|
||||
# These variables get exported to #defines in config/*.hh (see src/SConscript).
|
||||
export_vars += ['USE_FENV', 'TARGET_ISA', 'TARGET_GPU_ISA',
|
||||
'USE_POSIX_CLOCK', 'USE_KVM', 'USE_TUNTAP', 'PROTOCOL',
|
||||
'HAVE_PROTOBUF', 'HAVE_VALGRIND',
|
||||
'USE_POSIX_CLOCK', 'USE_KVM', 'USE_TUNTAP', 'BUILD_GPU',
|
||||
'PROTOCOL', 'HAVE_PROTOBUF', 'HAVE_VALGRIND',
|
||||
'HAVE_PERF_ATTR_EXCLUDE_HOST', 'USE_PNG',
|
||||
'NUMBER_BITS_PER_SET', 'USE_HDF5']
|
||||
|
||||
@@ -1028,9 +1028,6 @@ Build variables for {dir}:
|
||||
warning("Can't connect EtherTap with a tap device.")
|
||||
env['USE_TUNTAP'] = False
|
||||
|
||||
if env['BUILD_GPU']:
|
||||
env.Append(CPPDEFINES=['BUILD_GPU'])
|
||||
|
||||
# Warn about missing optional functionality
|
||||
if env['USE_KVM']:
|
||||
if not main['HAVE_PERF_ATTR_EXCLUDE_HOST']:
|
||||
|
||||
Reference in New Issue
Block a user