scons: Keep the list of all CPU models in a construction variable.

This relaxes ordering around CPU model declaration.

Change-Id: Ie5f8da1903a883bd4d98800dfbef7fd913021f77
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48964
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Gabe Black <gabe.black@gmail.com>
This commit is contained in:
Gabe Black
2021-07-31 23:36:12 -07:00
parent c8ba86c214
commit a764139066

View File

@@ -25,12 +25,12 @@
Import('*')
all_cpus = set()
def CpuModel(name):
all_cpus.add(name)
main.Append(ALL_CPU_MODELS=[name])
Export('CpuModel')
def add_cpu_models_var():
sticky_vars.Add(ListVariable('CPU_MODELS', 'CPU models', [], all_cpus))
sticky_vars.Add(ListVariable('CPU_MODELS', 'CPU models', [],
set(main.get('ALL_CPU_MODELS', []))))
AfterSConsopts(add_cpu_models_var)