Memoize the result of spack.platforms.host() (#26573)
This commit is contained in:
parent
20ee786d09
commit
05834e7c9d
@ -13,6 +13,7 @@
|
||||
platforms = [Cray, Darwin, Linux, Test]
|
||||
|
||||
|
||||
@llnl.util.lang.memoized
|
||||
def _host():
|
||||
"""Detect and return the platform for this machine or None if detection fails."""
|
||||
for platform_cls in sorted(platforms, key=lambda plt: plt.priority):
|
||||
|
Loading…
Reference in New Issue
Block a user