backends/ninja: all files in a java target should depend on generated sources

Because java files are both headers and source it's very probably that
generation and compilation will race otherwise.
pull/4488/head
Dylan Baker 6 years ago
parent 62e1735828
commit 9294fd23be
  1. 4
      mesonbuild/backend/ninjabackend.py

@ -877,6 +877,10 @@ int dummy;
def generate_single_java_compile(self, src, target, compiler, outfile):
deps = [os.path.join(self.get_target_dir(l), l.get_filename()) for l in target.link_targets]
generated_sources = self.get_target_generated_sources(target)
for rel_src, gensrc in generated_sources.items():
if rel_src.endswith('.java'):
deps.append(rel_src)
args = []
args += compiler.get_buildtype_args(self.get_option_for_target('buildtype', target))
args += self.build.get_global_args(compiler, target.is_cross)

Loading…
Cancel
Save