diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2021-10-07 14:04:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-07 14:04:05 +0200 |
commit | 05834e7c9d096586bee902c24762e66e340e333d (patch) | |
tree | 5c8d5a23294edce8bf36db28ac241424f6d7cd5f | |
parent | 20ee786d09907bc0e028c3c86b77505a496b0539 (diff) | |
download | spack-05834e7c9d096586bee902c24762e66e340e333d.tar.gz spack-05834e7c9d096586bee902c24762e66e340e333d.tar.bz2 spack-05834e7c9d096586bee902c24762e66e340e333d.tar.xz spack-05834e7c9d096586bee902c24762e66e340e333d.zip |
Memoize the result of spack.platforms.host() (#26573)
-rw-r--r-- | lib/spack/spack/platforms/_functions.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/spack/spack/platforms/_functions.py b/lib/spack/spack/platforms/_functions.py index 17dfbb5d67..c1301c47ff 100644 --- a/lib/spack/spack/platforms/_functions.py +++ b/lib/spack/spack/platforms/_functions.py @@ -13,6 +13,7 @@ from .test import Test 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): |