diff options
author | Daniel Dunbar <daniel@zuster.org> | 2012-05-15 18:44:17 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2012-05-15 18:44:17 +0000 |
commit | b5cd41e26f89aad2f2dc4f5dc37577f7abf8528a (patch) | |
tree | 8a0f75441b6e5641d8c8856c18e09d90c0d40b8c /utils/llvm-build/llvmbuild/componentinfo.py | |
parent | 177a119621f14a6ced87982ada75372815b636cf (diff) |
llvm-build: Add support for non-installed libraries (e.g., gtest).
- These libraries are only reported by llvm-config when run from a development
tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156838 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/llvm-build/llvmbuild/componentinfo.py')
-rw-r--r-- | utils/llvm-build/llvmbuild/componentinfo.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/utils/llvm-build/llvmbuild/componentinfo.py b/utils/llvm-build/llvmbuild/componentinfo.py index c32cc1aeb0..e684ac2b7d 100644 --- a/utils/llvm-build/llvmbuild/componentinfo.py +++ b/utils/llvm-build/llvmbuild/componentinfo.py @@ -116,6 +116,7 @@ class LibraryComponentInfo(ComponentInfo): kwargs['required_libraries'] = items.get_list('required_libraries') kwargs['add_to_library_groups'] = items.get_list( 'add_to_library_groups') + kwargs['installed'] = items.get_optional_bool('installed', True) return kwargs @staticmethod @@ -124,7 +125,7 @@ class LibraryComponentInfo(ComponentInfo): return LibraryComponentInfo(subpath, **kwargs) def __init__(self, subpath, name, dependencies, parent, library_name, - required_libraries, add_to_library_groups): + required_libraries, add_to_library_groups, installed): ComponentInfo.__init__(self, subpath, name, dependencies, parent) # If given, the name to use for the library instead of deriving it from @@ -139,6 +140,9 @@ class LibraryComponentInfo(ComponentInfo): # considered part of. self.add_to_library_groups = list(add_to_library_groups) + # Whether or not this library is installed. + self.installed = installed + def get_component_references(self): for r in ComponentInfo.get_component_references(self): yield r @@ -160,6 +164,8 @@ class LibraryComponentInfo(ComponentInfo): if self.add_to_library_groups: print >>result, 'add_to_library_groups = %s' % ' '.join( self.add_to_library_groups) + if not self.installed: + print >>result, 'installed = 0' return result.getvalue() def get_library_name(self): @@ -194,10 +200,10 @@ class OptionalLibraryComponentInfo(LibraryComponentInfo): return OptionalLibraryComponentInfo(subpath, **kwargs) def __init__(self, subpath, name, dependencies, parent, library_name, - required_libraries, add_to_library_groups): + required_libraries, add_to_library_groups, installed): LibraryComponentInfo.__init__(self, subpath, name, dependencies, parent, library_name, required_libraries, - add_to_library_groups) + add_to_library_groups, installed) class LibraryGroupComponentInfo(ComponentInfo): type_name = 'LibraryGroup' |