Correctly extract platform from the dependency.
If the `dep` is a two char string (as "qt"), the `platform, name = dep` will split the string and search for 't' dependency in 'q' platform. So, we have to be sure that the dep is a tuple before splitting it.
This commit is contained in:
parent
fc61fbab3d
commit
63003d5bce
|
@ -22,9 +22,9 @@ def add_target_step(key, what):
|
|||
_target_steps[key] = what
|
||||
|
||||
def get_target_step(key, default_context=None):
|
||||
try:
|
||||
if isinstance(key, tuple):
|
||||
context, target = key
|
||||
except ValueError:
|
||||
else:
|
||||
context, target = default_context, key
|
||||
return _target_steps[(context, target)]
|
||||
|
||||
|
|
|
@ -68,9 +68,9 @@ class Builder:
|
|||
|
||||
targetPlatform = PlatformInfo.get_platform(targetPlatformName)
|
||||
for dep in target.get_dependencies(targetPlatform, True):
|
||||
try:
|
||||
if isinstance(dep, tuple):
|
||||
depPlatform, depName = dep
|
||||
except ValueError:
|
||||
else:
|
||||
depPlatform, depName = targetPlatformName, dep
|
||||
if (depPlatform, depName) in targets:
|
||||
yield from self.order_dependencies((depPlatform, depName), targets)
|
||||
|
|
|
@ -57,9 +57,9 @@ class PlatformInfo(metaclass=_MetaPlatform):
|
|||
targets[('source', targetName)] = targetClass.Source
|
||||
targets[(self.name, targetName)] = targetClass.Builder
|
||||
for dep in targetClass.Builder.get_dependencies(self, False):
|
||||
try:
|
||||
if isinstance(dep, tuple):
|
||||
depPlatformName, depName = dep
|
||||
except ValueError:
|
||||
else:
|
||||
depPlatformName, depName = self.name, dep
|
||||
depPlatform = self.get_platform(depPlatformName, targets)
|
||||
depPlatform.add_targets(depName, targets)
|
||||
|
|
Loading…
Reference in New Issue