Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/58490 )

Change subject: scons: Ensure the fast model license count is always at least 1.
......................................................................

scons: Ensure the fast model license count is always at least 1.

Even though the default value for the license count is 1, it seems that
if fast model is disabled, kconfig will set it to 0. When creating a
cycle using itertools over a list with zero elements, it will raise a
StopIteration.

Even though we don't actually try to build any fast model components
in that case, we do still set them up with a license slot. If the
cycle iterator is essentially broken, that will prevent that from
working and break the build.

This change forces the license count to be at least 1, even if fast
model is disabled and the license count may be set to 0 in the config.

Change-Id: Ia8df256a8f292deb6fb6fa3c5f9a7d58c2b7f782
---
M src/arch/arm/fastmodel/SConscript
1 file changed, 23 insertions(+), 1 deletion(-)



diff --git a/src/arch/arm/fastmodel/SConscript b/src/arch/arm/fastmodel/SConscript
index bfe7e97..b458d0f 100644
--- a/src/arch/arm/fastmodel/SConscript
+++ b/src/arch/arm/fastmodel/SConscript
@@ -268,7 +268,7 @@
         t[0] = t[1]


-license_count = int(env['CONF']['ARMLMD_LICENSE_COUNT'])
+license_count = max(int(env['CONF']['ARMLMD_LICENSE_COUNT']), 1)
 arm_licenses = list((Value(object()) for i in range(license_count)))
 license_cycle = cycle(arm_licenses)


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/58490
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: Ia8df256a8f292deb6fb6fa3c5f9a7d58c2b7f782
Gerrit-Change-Number: 58490
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-CC: Gabe Black <gabebl...@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

Reply via email to