Earl Ou has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/40476 )
Change subject: scons,fastmodel: workaround SideEffect in scons
......................................................................
scons,fastmodel: workaround SideEffect in scons
Previously we use SideEffect to control the usage of license files.
However, a scons issue https://github.com/SCons/scons/issues/2777
generate strange error message when one of the build step fail, and
hide the actual information. This CL creates a workaround implementation.
Change-Id: I9739790a3b405204ee04acb3f548bc91dc7f219d
---
M src/arch/arm/fastmodel/SConscript
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/arch/arm/fastmodel/SConscript
b/src/arch/arm/fastmodel/SConscript
index 5cde27f..1c7ab4f 100644
--- a/src/arch/arm/fastmodel/SConscript
+++ b/src/arch/arm/fastmodel/SConscript
@@ -247,6 +247,14 @@
arm_licenses = list((Value(object()) for i in range(license_count)))
license_cycle = cycle(arm_licenses)
+# https://github.com/SCons/scons/issues/2777 causes
+# strange error message when using SideEffect. Here we create a workaround
+# until the original issue fixed.
+workaround_scons_issue_2777 = True
+
+if workaround_scons_issue_2777:
+ pool_deps = {}
+
class ArmFastModelComponent(object):
def __init__(self, project_file, *extra_deps):
project_file = File(project_file)
@@ -331,7 +339,13 @@
#
# This allocation is fixed and may not be as optimal as a dynamic
one,
# but the difference is probably not significant.
- env.SideEffect(next(license_cycle), lib_nodes[0])
+ if not workaround_scons_issue_2777:
+ env.SideEffect(next(license_cycle), lib_nodes[0])
+ else:
+ pool_idx = next(license_cycle)
+ if pool_deps.get(pool_idx):
+ Depends(lib_nodes[0], pool_deps[pool_idx])
+ pool_deps[pool_idx] = lib_nodes[0]
def prepare_env(self, env):
env.Append(LIBPATH=self.libpaths)
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/40476
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I9739790a3b405204ee04acb3f548bc91dc7f219d
Gerrit-Change-Number: 40476
Gerrit-PatchSet: 1
Gerrit-Owner: Earl Ou <shunhsin...@google.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s