summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-06-27 02:19:26 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2016-06-27 02:19:26 -0700
commit99c3ed56fae3b4a70a03a60aa645a282136a025d (patch)
treee124e10d13fe2ea34428225a4dd3ecf4b818c1af /lib
parent305d5698df11b5b34de50852e7c0db42319a4c08 (diff)
downloadspack-99c3ed56fae3b4a70a03a60aa645a282136a025d.tar.gz
spack-99c3ed56fae3b4a70a03a60aa645a282136a025d.tar.bz2
spack-99c3ed56fae3b4a70a03a60aa645a282136a025d.tar.xz
spack-99c3ed56fae3b4a70a03a60aa645a282136a025d.zip
Add new sys_type method that prints out the *full* arch descriptor.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/architecture.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py
index 5bfd052f2a..a7cda2bf68 100644
--- a/lib/spack/spack/architecture.py
+++ b/lib/spack/spack/architecture.py
@@ -516,3 +516,20 @@ def platform():
for platform_cls in platform_list:
if platform_cls.detect():
return platform_cls()
+
+
+@memoized
+def sys_type():
+ """Print out the "default" platform-os-target tuple for this machine.
+
+ On machines with only one target OS/target, prints out the
+ platform-os-target for the frontend. For machines with a frontend
+ and a backend, prints the default backend.
+
+ TODO: replace with use of more explicit methods to get *all* the
+ backends, as client code should really be aware of cross-compiled
+ architectures.
+
+ """
+ arch = Arch(platform(), 'default_os', 'default_target')
+ return str(arch)