diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-12-06 23:13:42 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-12-06 23:13:42 +0000 |
commit | 309fc86e7c2b7ef805e75ff2be1da8d3f6b920d5 (patch) | |
tree | b1009920a3eae80310a2436c59652a4a79c44368 /utils/llvm-build | |
parent | 6805b56e7786f754756526e82e5a29bc77d97e9e (diff) |
llvm-build: Don't generate duplicate dependencies when LLVMBuild files define
multiple components.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145989 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/llvm-build')
-rw-r--r-- | utils/llvm-build/llvmbuild/main.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/utils/llvm-build/llvmbuild/main.py b/utils/llvm-build/llvmbuild/main.py index c77ffcd14b..9c3126c480 100644 --- a/utils/llvm-build/llvmbuild/main.py +++ b/utils/llvm-build/llvmbuild/main.py @@ -397,9 +397,15 @@ class LLVMProjectInfo(object): # Construct a list of all the dependencies of the Makefile fragment # itself. These include all the LLVMBuild files themselves, as well as # all of our own sources. + # + # Many components may come from the same file, so we make sure to unique + # these. + build_paths = set() for ci in self.component_infos: - yield os.path.join(self.source_root, ci.subpath[1:], - 'LLVMBuild.txt') + p = os.path.join(self.source_root, ci.subpath[1:], 'LLVMBuild.txt') + if p not in build_paths: + yield p + build_paths.add(p) # Gather the list of necessary sources by just finding all loaded # modules that are inside the LLVM source tree. |