Allow the platform itself to set on which platform we need to build the dep
For some complex build, we may want to build a dependency on another platform that the target platform.
This commit is contained in:
parent
ef4cf7ada7
commit
1b2b3efb54
|
@ -76,10 +76,7 @@ class Builder:
|
|||
|
||||
targetPlatform = PlatformInfo.get_platform(targetPlatformName)
|
||||
for dep in target.get_dependencies(targetPlatform, True):
|
||||
if isinstance(dep, tuple):
|
||||
depPlatform, depName = dep
|
||||
else:
|
||||
depPlatform, depName = targetPlatformName, dep
|
||||
depPlatform, depName = targetPlatform.get_fully_qualified_dep(dep)
|
||||
if (depPlatform, depName) in targets:
|
||||
yield from self.order_dependencies((depPlatform, depName), targets)
|
||||
yield ('source', targetName)
|
||||
|
|
|
@ -65,6 +65,13 @@ class PlatformInfo(metaclass=_MetaPlatform):
|
|||
depPlatform.add_targets(depName, targets)
|
||||
return [(self.name, targetName)]
|
||||
|
||||
def get_fully_qualified_dep(self, dep):
|
||||
if isinstance(dep, tuple):
|
||||
return dep
|
||||
else:
|
||||
return self.name, dep
|
||||
|
||||
|
||||
def get_cross_config(self):
|
||||
return {}
|
||||
|
||||
|
|
Loading…
Reference in New Issue