From a8c5f8dad973e4c6644c82b2d1dd99ffcfedfc04 Mon Sep 17 00:00:00 2001 From: Pierre Lamot Date: Wed, 7 Aug 2024 16:32:20 +0200 Subject: [PATCH] backend/ninja: fix bad @OUTPUTn@ replacements `outfilelist` is the output list of the target, while `outfiles` is the output list of the individual commands Bug: mesonbuild/meson/pull/13304#issuecomment-2226398671 --- mesonbuild/backend/ninjabackend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 1eeda96a8ce8..aa347dd9b043 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -2623,7 +2623,7 @@ def generate_genlist_for_target(self, genlist: build.GeneratedList, target: buil args = [x.replace('@DEPFILE@', depfile) for x in base_args] args = [x.replace("@INPUT@", infilename).replace('@OUTPUT@', sole_output) for x in args] - args = self.replace_outputs(args, self.get_target_private_dir(target), outfilelist) + args = self.replace_outputs(args, self.get_target_private_dir(target), outfiles) # We have consumed output files, so drop them from the list of remaining outputs. if len(generator.outputs) > 1: outfilelist = outfilelist[len(generator.outputs):]