llvm-build: Don't write out the required_libraries list for "special" components...
authorDaniel Dunbar <daniel@zuster.org>
Mon, 12 Dec 2011 22:45:41 +0000 (22:45 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Mon, 12 Dec 2011 22:45:41 +0000 (22:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146435 91177308-0d34-0410-b5e6-96231b3b80d8

utils/llvm-build/llvmbuild/componentinfo.py
utils/llvm-build/llvmbuild/main.py

index e9ef973d08a9fb4282a23bf667195b4e3ab83cd2..85264611a9f990a42a4c2ff5ec25afb602b724a9 100644 (file)
@@ -45,6 +45,10 @@ class ComponentInfo(object):
         # The original source path.
         self._source_path = None
 
+        # A flag to mark "special" components which have some amount of magic
+        # handling (generally based on command line options).
+        self._is_special_group = False
+
     def set_parent_instance(self, parent):
         assert parent.name == self.parent, "Unexpected parent!"
         self.parent_instance = parent
@@ -197,7 +201,7 @@ class LibraryGroupComponentInfo(ComponentInfo):
         print >>result, 'type = %s' % self.type_name
         print >>result, 'name = %s' % self.name
         print >>result, 'parent = %s' % self.parent
-        if self.required_libraries:
+        if self.required_libraries and not self._is_special_group:
             print >>result, 'required_libraries = %s' % ' '.join(
                 self.required_libraries)
         if self.add_to_library_groups:
index 71e11d79cff4e4f2af5869e5760682d1b12ac4f4..550c7403034d6eea00d7314baca0bee2ea64e3ca 100644 (file)
@@ -666,6 +666,7 @@ def add_magic_target_components(parser, project, opts):
             fatal("special component %r must have empty %r list" % (
                     name, 'add_to_library_groups'))
 
+        info._is_special_group = True
         return info
 
     info_map = dict((ci.name, ci) for ci in project.component_infos)