diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-12-12 22:45:59 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-12-12 22:45:59 +0000 |
commit | e5609abccbd329ef4b07270c8b71a5b59cfe8bce (patch) | |
tree | db1a8da69f79db4c5cafff00b7c2e80a4218916d /utils/llvm-build/llvmbuild/componentinfo.py | |
parent | b0c594fd422417e1e290da166b566c7bee74644b (diff) |
llvm-build: Switch to using the common subdirectory list instead of
autodiscovery.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146437 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/llvm-build/llvmbuild/componentinfo.py')
-rw-r--r-- | utils/llvm-build/llvmbuild/componentinfo.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/utils/llvm-build/llvmbuild/componentinfo.py b/utils/llvm-build/llvmbuild/componentinfo.py index 85264611a9..230ae219f2 100644 --- a/utils/llvm-build/llvmbuild/componentinfo.py +++ b/utils/llvm-build/llvmbuild/componentinfo.py @@ -381,6 +381,16 @@ def load_from_path(path, subpath): parser = ConfigParser.RawConfigParser() parser.read(path) + # Extract the common section. + if parser.has_section("common"): + common = IniFormatParser(parser.items("common")) + parser.remove_section("common") + else: + common = IniFormatParser({}) + + return common, _read_components_from_parser(parser, path, subpath) + +def _read_components_from_parser(parser, path, subpath): # We load each section which starts with 'component' as a distinct component # description (so multiple components can be described in one file). for section in parser.sections(): |