diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-09-30 10:32:28 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-10-01 12:21:31 -0700 |
commit | 73dd21036cab021b5eed57cb4ffdd3c41daa1ad8 (patch) | |
tree | 26a78c3474d95499051276a015573e7bc2024fbd /mesonbuild/backend | |
parent | bd2fcb268b9ff48797bebb6a2ef94d2741234191 (diff) | |
download | meson-73dd21036cab021b5eed57cb4ffdd3c41daa1ad8.zip meson-73dd21036cab021b5eed57cb4ffdd3c41daa1ad8.tar.gz meson-73dd21036cab021b5eed57cb4ffdd3c41daa1ad8.tar.bz2 |
rust: dependencies need to cause a rebuild/relink not just reorder
Otherwise changes to a dependency don't propogate
Diffstat (limited to 'mesonbuild/backend')
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 80a1c56..59f94b1 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -1651,7 +1651,10 @@ class NinjaBackend(backends.Backend): args += compilers.get_base_compile_args(base_proxy, rustc) self.generate_generator_list_rules(target) - orderdeps = [os.path.join(t.subdir, t.get_filename()) for t in target.link_targets] + # dependencies need to cause a relink, they're not just for odering + deps = [os.path.join(t.subdir, t.get_filename()) for t in target.link_targets] + + orderdeps: T.List[str] = [] main_rust_file = None for i in target.get_sources(): @@ -1772,6 +1775,8 @@ class NinjaBackend(backends.Backend): element = NinjaBuildElement(self.all_outputs, target_name, compiler_name, main_rust_file) if orderdeps: element.add_orderdep(orderdeps) + if deps: + element.add_dep(deps) element.add_item('ARGS', args) element.add_item('targetdep', depfile) element.add_item('cratetype', cratetype) |