aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-05-13 16:19:33 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2020-05-15 08:39:25 +0000
commita25f0741e8ac663c8b3a6e33df8a0875dceab804 (patch)
tree876ea71401b61c2935cf6620e51620bd10ddbb8a
parentcd3e65a790b98e9106b56ad76863abe55b4096fa (diff)
downloadmeson-a25f0741e8ac663c8b3a6e33df8a0875dceab804.zip
meson-a25f0741e8ac663c8b3a6e33df8a0875dceab804.tar.gz
meson-a25f0741e8ac663c8b3a6e33df8a0875dceab804.tar.bz2
ninjabackend: Use order-only gen-header deps for gen-sources
We do not need to *always* rebuild generated sources when a generated header changes. We will get that information from the compiler's dependency file, and ninja will track it for us. This is exactly the same as static sources. However, we do need an order-only dependency on all generated headers, because we cannot know what headers will be needed at compile time (which is when the compiler's dependency file is generated). This fixes spurious rebuilds and relinking in many cases.
-rw-r--r--mesonbuild/backend/ninjabackend.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 9b895c9..b1e6afa 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -585,7 +585,7 @@ int dummy;
o = self.generate_llvm_ir_compile(target, src)
else:
o = self.generate_single_compile(target, src, True,
- header_deps=header_deps)
+ order_deps=header_deps)
obj_list.append(o)
use_pch = self.environment.coredata.base_options.get('b_pch', False)