[llvm-commits] [llvm] r145989 - /llvm/trunk/utils/llvm-build/llvmbuild/main.py
Daniel Dunbar
daniel at zuster.org
Tue Dec 6 15:13:43 PST 2011
Author: ddunbar
Date: Tue Dec 6 17:13:42 2011
New Revision: 145989
URL: http://llvm.org/viewvc/llvm-project?rev=145989&view=rev
Log:
llvm-build: Don't generate duplicate dependencies when LLVMBuild files define
multiple components.
Modified:
llvm/trunk/utils/llvm-build/llvmbuild/main.py
Modified: llvm/trunk/utils/llvm-build/llvmbuild/main.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm-build/llvmbuild/main.py?rev=145989&r1=145988&r2=145989&view=diff
==============================================================================
--- llvm/trunk/utils/llvm-build/llvmbuild/main.py (original)
+++ llvm/trunk/utils/llvm-build/llvmbuild/main.py Tue Dec 6 17:13:42 2011
@@ -397,9 +397,15 @@
# 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.
More information about the llvm-commits
mailing list