mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
llvm-build: Don't emit library information for disabled targets.
llvm-svn: 156837
This commit is contained in:
parent
551d4ff482
commit
9fa09aa92b
@ -68,6 +68,21 @@ class ComponentInfo(object):
|
|||||||
def get_llvmbuild_fragment(self):
|
def get_llvmbuild_fragment(self):
|
||||||
abstract
|
abstract
|
||||||
|
|
||||||
|
def get_parent_target_group(self):
|
||||||
|
"""get_parent_target_group() -> ComponentInfo or None
|
||||||
|
|
||||||
|
Return the nearest parent target group (if any), or None if the
|
||||||
|
component is not part of any target group.
|
||||||
|
"""
|
||||||
|
|
||||||
|
# If this is a target group, return it.
|
||||||
|
if self.type_name == 'TargetGroup':
|
||||||
|
return self
|
||||||
|
|
||||||
|
# Otherwise recurse on the parent, if any.
|
||||||
|
if self.parent_instance:
|
||||||
|
return self.parent_instance.get_parent_target_group()
|
||||||
|
|
||||||
class GroupComponentInfo(ComponentInfo):
|
class GroupComponentInfo(ComponentInfo):
|
||||||
"""
|
"""
|
||||||
Group components have no semantics as far as the build system are concerned,
|
Group components have no semantics as far as the build system are concerned,
|
||||||
|
@ -319,11 +319,16 @@ subdirectories = %s
|
|||||||
# dependencies for added library groups.
|
# dependencies for added library groups.
|
||||||
entries = {}
|
entries = {}
|
||||||
for c in self.ordered_component_infos:
|
for c in self.ordered_component_infos:
|
||||||
# Skip optional components which are not enabled
|
# Skip optional components which are not enabled.
|
||||||
if c.type_name == 'OptionalLibrary' \
|
if c.type_name == 'OptionalLibrary' \
|
||||||
and c.name not in enabled_optional_components:
|
and c.name not in enabled_optional_components:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# Skip target groups which are not enabled.
|
||||||
|
tg = c.get_parent_target_group()
|
||||||
|
if tg and not tg.enabled:
|
||||||
|
continue
|
||||||
|
|
||||||
# Only certain components are in the table.
|
# Only certain components are in the table.
|
||||||
if c.type_name not in ('Library', 'OptionalLibrary', \
|
if c.type_name not in ('Library', 'OptionalLibrary', \
|
||||||
'LibraryGroup', 'TargetGroup'):
|
'LibraryGroup', 'TargetGroup'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user