llvm.org GIT mirror llvm / 177a119
llvm-build: Don't emit library information for disabled targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156837 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 8 years ago
2 changed file(s) with 21 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
6666
6767 def get_llvmbuild_fragment(self):
6868 abstract
69
70 def get_parent_target_group(self):
71 """get_parent_target_group() -> ComponentInfo or None
72
73 Return the nearest parent target group (if any), or None if the
74 component is not part of any target group.
75 """
76
77 # If this is a target group, return it.
78 if self.type_name == 'TargetGroup':
79 return self
80
81 # Otherwise recurse on the parent, if any.
82 if self.parent_instance:
83 return self.parent_instance.get_parent_target_group()
6984
7085 class GroupComponentInfo(ComponentInfo):
7186 """
318318 # dependencies for added library groups.
319319 entries = {}
320320 for c in self.ordered_component_infos:
321 # Skip optional components which are not enabled
321 # Skip optional components which are not enabled.
322322 if c.type_name == 'OptionalLibrary' \
323323 and c.name not in enabled_optional_components:
324 continue
325
326 # Skip target groups which are not enabled.
327 tg = c.get_parent_target_group()
328 if tg and not tg.enabled:
324329 continue
325330
326331 # Only certain components are in the table.