architecture/subsystems
This commit is contained in:
parent
27ce3ca25c
commit
1857f0e1b0
2 changed files with 7 additions and 13 deletions
|
@ -1,5 +1,6 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
import arguments
|
||||||
import distribution
|
import distribution
|
||||||
import subsystem
|
import subsystem
|
||||||
|
|
||||||
|
@ -12,11 +13,16 @@ class Architecture:
|
||||||
self.name = name
|
self.name = name
|
||||||
self.bits = bits
|
self.bits = bits
|
||||||
self.distribution = distribution.Distribution(self)
|
self.distribution = distribution.Distribution(self)
|
||||||
self.subsystems = {s: subsystem.SubSystem(self, s) for s in subsystems}
|
self.subsystems = {s: subsystem.SubSystem(self, s)
|
||||||
|
for s in [f if f == subsystem.MAIN
|
||||||
|
else f'{f}{self.bits}'
|
||||||
|
for f in arguments.subsystems]
|
||||||
|
if s in subsystems}
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
lines = [
|
lines = [
|
||||||
f'Name: {self.name}',
|
f'Name: {self.name}',
|
||||||
|
f'Bits: {self.bits}',
|
||||||
]
|
]
|
||||||
return os.linesep.join(lines)
|
return os.linesep.join(lines)
|
||||||
|
|
||||||
|
|
12
msys.py
12
msys.py
|
@ -16,15 +16,3 @@ ARCHITECTURES_SUBSYSTEMS = {
|
||||||
'i686': [SUBSYSTEM, 'clang32', 'mingw32'],
|
'i686': [SUBSYSTEM, 'clang32', 'mingw32'],
|
||||||
}
|
}
|
||||||
SUBSYSTEMS = [SUBSYSTEM, 'clang', 'mingw', 'ucrt']
|
SUBSYSTEMS = [SUBSYSTEM, 'clang', 'mingw', 'ucrt']
|
||||||
|
|
||||||
|
|
||||||
def get_subsystems(architecture, families):
|
|
||||||
list = []
|
|
||||||
for family in families:
|
|
||||||
if family == SUBSYSTEM:
|
|
||||||
subsystem = family
|
|
||||||
else:
|
|
||||||
subsystem = f'{family}{architecture.bits}'
|
|
||||||
if subsystem in ARCHITECTURES_SUBSYSTEMS[architecture.name]:
|
|
||||||
list.append(subsystem)
|
|
||||||
return list
|
|
||||||
|
|
Loading…
Reference in a new issue