diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2020-10-26 06:21:48 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-11-15 14:21:31 +0100 |
commit | 0b2865e8b95ef119271011c5854836589e8866ad (patch) | |
tree | fab60e66e18b27f5e354f7fbcc94d3eda0ebe81b | |
parent | 4caa0577ecfdc9b4d7101cfb07154384fdd191a9 (diff) | |
download | meson-0b2865e8b95ef119271011c5854836589e8866ad.zip meson-0b2865e8b95ef119271011c5854836589e8866ad.tar.gz meson-0b2865e8b95ef119271011c5854836589e8866ad.tar.bz2 |
ninjabackend: stabilize order of dependencies and order-only dependencies
These do not go into the command line, and therefore do not matter
for the purpose of avoiding unnecessary rebuilds after meson is
rerun. However, they complicate the task of finding differences
between build lines across meson reruns.
So take the easy way out and sort everything after | and ||.
With this change, there is absolutely no change in QEMU's 40000-line
build.ninja file after meson is rerun.
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index c3c5705..15218c1 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -359,9 +359,9 @@ class NinjaBuildElement: rulename = self.rulename line = 'build {}{}: {} {}'.format(outs, implicit_outs, rulename, ins) if len(self.deps) > 0: - line += ' | ' + ' '.join([ninja_quote(x, True) for x in self.deps]) + line += ' | ' + ' '.join([ninja_quote(x, True) for x in sorted(self.deps)]) if len(self.orderdeps) > 0: - line += ' || ' + ' '.join([ninja_quote(x, True) for x in self.orderdeps]) + line += ' || ' + ' '.join([ninja_quote(x, True) for x in sorted(self.orderdeps)]) line += '\n' # This is the only way I could find to make this work on all # platforms including Windows command shell. Slash is a dir separator |