be more tolerant when parsing new specs.
This commit is contained in:
parent
c90cc465f5
commit
f3d6818d5c
@ -526,7 +526,12 @@ def _add_flag(self, name, value):
|
|||||||
"""
|
"""
|
||||||
valid_flags = FlagMap.valid_compiler_flags()
|
valid_flags = FlagMap.valid_compiler_flags()
|
||||||
if name == 'arch' or name == 'architecture':
|
if name == 'arch' or name == 'architecture':
|
||||||
platform, op_sys, target = value.split('-')
|
parts = value.split('-')
|
||||||
|
if len(parts) == 3:
|
||||||
|
platform, op_sys, target = parts
|
||||||
|
else:
|
||||||
|
platform, op_sys, target = None, None, value
|
||||||
|
|
||||||
assert(self.architecture.platform is None)
|
assert(self.architecture.platform is None)
|
||||||
assert(self.architecture.platform_os is None)
|
assert(self.architecture.platform_os is None)
|
||||||
assert(self.architecture.target is None)
|
assert(self.architecture.target is None)
|
||||||
@ -596,10 +601,12 @@ def _set_platform(self, value):
|
|||||||
|
|
||||||
def _set_os(self, value):
|
def _set_os(self, value):
|
||||||
"""Called by the parser to set the architecture operating system"""
|
"""Called by the parser to set the architecture operating system"""
|
||||||
|
if self.architecture.platform:
|
||||||
self.architecture.platform_os = self.architecture.platform.operating_system(value)
|
self.architecture.platform_os = self.architecture.platform.operating_system(value)
|
||||||
|
|
||||||
def _set_target(self, value):
|
def _set_target(self, value):
|
||||||
"""Called by the parser to set the architecture target"""
|
"""Called by the parser to set the architecture target"""
|
||||||
|
if self.architecture.platform:
|
||||||
self.architecture.target = self.architecture.platform.target(value)
|
self.architecture.target = self.architecture.platform.target(value)
|
||||||
|
|
||||||
def _add_dependency(self, spec):
|
def _add_dependency(self, spec):
|
||||||
|
Loading…
Reference in New Issue
Block a user