From d9a51177fcf56b488bc7f8d5b288f8e7ffd474da Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Tue, 29 Mar 2022 22:34:20 -0700 Subject: [PATCH] scons: Tone down a fast model error into a warning. If a fast model static library can't be found, we should treat that as a warning instead of an error, and pass back the original library name so that it can at least be added and potentially come from somewhere else. In practice, this is important because gem5 will be configured by SCons indirectly in the future, using kconfig based tools that SCons runs on the user's behalf. If SCons is misconfigured or not configured, this error can trip, preventing those tools from starting. That creates a catch 22, since you'd need SCons to fix the config, and SCons can't run because of the config. We can avoid that problem by making SCons more lenient, so that it can still run even if it doesn't find static libraries where it might have expected to. Change-Id: Iadfd823b61fe96b937c2650250487d290492f265 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/58352 Maintainer: Gabe Black Reviewed-by: Yu-hsin Wang Tested-by: kokoro --- src/arch/arm/fastmodel/SConscript | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/arch/arm/fastmodel/SConscript b/src/arch/arm/fastmodel/SConscript index a7f6e17495..a8734cde8c 100644 --- a/src/arch/arm/fastmodel/SConscript +++ b/src/arch/arm/fastmodel/SConscript @@ -102,7 +102,8 @@ def staticify(env, name): full_name = Dir(path).File(static_name).get_abspath() if os.path.isfile(full_name): return File(full_name) - error("Failed to find FM static lib: " + name) + warning("Failed to find FM static lib: " + name) + return name # Adjust the build environment to support building in Fast Models.