ninja: Use a set for target deps and ordered deps

This significantly reduces the size of build.ninja for GStreamer.
pull/1545/head
Nirbheek Chauhan 8 years ago
parent 6963da616b
commit d2dc38abd4
  1. 12
      mesonbuild/backend/ninjabackend.py

@ -58,22 +58,22 @@ class NinjaBuildElement:
self.infilenames = [infilenames]
else:
self.infilenames = infilenames
self.deps = []
self.orderdeps = []
self.deps = set()
self.orderdeps = set()
self.elems = []
self.all_outputs = all_outputs
def add_dep(self, dep):
if isinstance(dep, list):
self.deps += dep
self.deps.update(dep)
else:
self.deps.append(dep)
self.deps.add(dep)
def add_orderdep(self, dep):
if isinstance(dep, list):
self.orderdeps += dep
self.orderdeps.update(dep)
else:
self.orderdeps.append(dep)
self.orderdeps.add(dep)
def add_item(self, name, elems):
if isinstance(elems, str):

Loading…
Cancel
Save