summaryrefslogtreecommitdiffstats
path: root/llvm/utils/llvm-build
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-12-06 23:13:42 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-12-06 23:13:42 +0000
commitcda2a8985cd44931e79e26f0037e718225c13404 (patch)
treee8e547c1110d9f7eca2083b207fbd55a63284890 /llvm/utils/llvm-build
parentbcfa2f83fb887ca1e4bbd726b43c375a14da9f2d (diff)
downloadbcm5719-llvm-cda2a8985cd44931e79e26f0037e718225c13404.tar.gz
bcm5719-llvm-cda2a8985cd44931e79e26f0037e718225c13404.zip
llvm-build: Don't generate duplicate dependencies when LLVMBuild files define
multiple components. llvm-svn: 145989
Diffstat (limited to 'llvm/utils/llvm-build')
-rw-r--r--llvm/utils/llvm-build/llvmbuild/main.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/utils/llvm-build/llvmbuild/main.py b/llvm/utils/llvm-build/llvmbuild/main.py
index c77ffcd14b3..9c3126c4801 100644
--- a/llvm/utils/llvm-build/llvmbuild/main.py
+++ b/llvm/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.
OpenPOWER on IntegriCloud