subsystems

This commit is contained in:
Marc Beninca 2021-10-10 16:27:52 +02:00 committed by Marc Beninca
parent 7033a6189e
commit e9e6994c62
4 changed files with 13 additions and 9 deletions

View file

@ -1,18 +1,18 @@
import os
import distribution
import subsystem
X86 = 'x86_64'
I86 = 'i686'
class Architecture:
def __init__(self, name, bits):
def __init__(self, name, bits, subsystems):
self.name = name
self.bits = bits
self.distribution = distribution.Distribution(self)
# TODO subsystems
self.subsystems = {}
self.subsystems = {s: subsystem.SubSystem(self, s) for s in subsystems}
def __str__(self):
lines = [
@ -21,7 +21,12 @@ class Architecture:
return os.linesep.join(lines)
x86 = Architecture(X86, 64, [subsystem.MAIN,
'clang64', 'mingw64', 'ucrt64'])
i86 = Architecture(I86, 32, [subsystem.MAIN,
'clang32', 'mingw32'])
ARCHITECTURES = {
X86: Architecture(X86, 64),
I86: Architecture(I86, 32),
X86: x86,
I86: i86,
}