More betterer sorting.

pull/15/head
Jussi Pakkanen 11 years ago
parent 279dd5e809
commit 7f09d89eaa
  1. 3
      backends.py
  2. 2
      ninjabackend.py

@ -277,7 +277,8 @@ class Backend():
for src in self.generate_unity_files(target, unity_src):
obj_list.append(self.generate_single_compile(target, outfile, src, True, unity_deps + header_deps))
linker = self.determine_linker(target, src_list)
elem = self.generate_link(target, outfile, outname, obj_list, linker)
# Sort object list to preserve command line over multiple invocations.
elem = self.generate_link(target, outfile, outname, sorted(obj_list), linker)
self.generate_shlib_aliases(target, self.get_target_dir(target), outfile, elem)
self.processed_targets[name] = True

@ -71,7 +71,7 @@ class NinjaBuildElement():
# This allows Ninja to skip unnecessary rebuilds.
line = 'build %s: %s %s' % (' '.join([ninja_quote(i) for i in self.outfilenames]),\
self.rule,
' '.join([ninja_quote(i) for i in sorted(self.infilenames)]))
' '.join([ninja_quote(i) for i in self.infilenames]))
if len(self.deps) > 0:
line += ' | ' + ' '.join([ninja_quote(x) for x in self.deps])
if len(self.orderdeps) > 0:

Loading…
Cancel
Save