Xcode: fix running commands that lie in the build root dir.

This commit is contained in:
Jussi Pakkanen 2021-04-17 18:57:36 +03:00
parent 09d89dfaeb
commit 126db6de12
2 changed files with 3 additions and 3 deletions

View File

@ -1200,7 +1200,7 @@ class Backend:
i = os.path.join(self.get_custom_target_output_dir(i), tmp) i = os.path.join(self.get_custom_target_output_dir(i), tmp)
elif isinstance(i, mesonlib.File): elif isinstance(i, mesonlib.File):
i = i.rel_to_builddir(self.build_to_src) i = i.rel_to_builddir(self.build_to_src)
if target.absolute_paths: if target.absolute_paths or absolute_outputs:
i = os.path.join(self.environment.get_build_dir(), i) i = os.path.join(self.environment.get_build_dir(), i)
# FIXME: str types are blindly added ignoring 'target.absolute_paths' # FIXME: str types are blindly added ignoring 'target.absolute_paths'
# because we can't know if they refer to a file or just a string # because we can't know if they refer to a file or just a string

View File

@ -1002,9 +1002,9 @@ class XCodeBackend(backends.Backend):
for tname, t in self.custom_targets.items(): for tname, t in self.custom_targets.items():
if not isinstance(t, build.CustomTarget): if not isinstance(t, build.CustomTarget):
continue continue
(srcs, ofilenames, cmd) = self.eval_custom_target_command(t) (srcs, ofilenames, cmd) = self.eval_custom_target_command(t, absolute_outputs=True)
fixed_cmd, _ = self.as_meson_exe_cmdline(t.name, fixed_cmd, _ = self.as_meson_exe_cmdline(t.name,
t.command[0], cmd[0],
cmd[1:], cmd[1:],
#workdir=None, #workdir=None,
env=t.env) env=t.env)