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

pull/7079/head
Jussi Pakkanen 4 years ago
parent 09d89dfaeb
commit 126db6de12
  1. 2
      mesonbuild/backend/backends.py
  2. 4
      mesonbuild/backend/xcodebackend.py

@ -1200,7 +1200,7 @@ class Backend:
i = os.path.join(self.get_custom_target_output_dir(i), tmp)
elif isinstance(i, mesonlib.File):
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)
# 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

@ -1002,9 +1002,9 @@ class XCodeBackend(backends.Backend):
for tname, t in self.custom_targets.items():
if not isinstance(t, build.CustomTarget):
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,
t.command[0],
cmd[0],
cmd[1:],
#workdir=None,
env=t.env)

Loading…
Cancel
Save