Skip to content

Commit

Permalink
llvm-build: Don't generate duplicate dependencies when LLVMBuild file…
Browse files Browse the repository at this point in the history
…s define

multiple components.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145989 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
ddunbar committed Dec 6, 2011
1 parent 6805b56 commit 309fc86
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions utils/llvm-build/llvmbuild/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,15 @@ def get_fragment_dependencies(self):
# 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.
Expand Down

0 comments on commit 309fc86

Please sign in to comment.