Add new sys_type method that prints out the *full* arch descriptor.
This commit is contained in:
parent
305d5698df
commit
99c3ed56fa
1 changed files with 17 additions and 0 deletions
|
@ -516,3 +516,20 @@ def platform():
|
||||||
for platform_cls in platform_list:
|
for platform_cls in platform_list:
|
||||||
if platform_cls.detect():
|
if platform_cls.detect():
|
||||||
return platform_cls()
|
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)
|
||||||
|
|
Loading…
Reference in a new issue