aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2021-08-31 18:59:10 -0400
committerEli Schwartz <eschwartz@archlinux.org>2021-09-01 15:42:39 -0400
commit0b63dff3badf4f728d5dadda81dbef8de67ba164 (patch)
tree287538d78c50c49068ff90f6c325a837821be270 /mesonbuild/backend/backends.py
parentd67850b45e9ce323405e80aacee872049a3bc389 (diff)
downloadmeson-0b63dff3badf4f728d5dadda81dbef8de67ba164.zip
meson-0b63dff3badf4f728d5dadda81dbef8de67ba164.tar.gz
meson-0b63dff3badf4f728d5dadda81dbef8de67ba164.tar.bz2
run_target: do not yield broken names with subdirs
A run_target object created in a subdir/meson.build always has a ninja rule name of "name", not "subdir/name". Fixes #9175
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r--mesonbuild/backend/backends.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index b119377..f8ccdbe 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -358,7 +358,10 @@ class Backend:
@lru_cache(maxsize=None)
def get_target_dir(self, target: T.Union[build.Target, build.CustomTargetIndex]) -> str:
- if self.environment.coredata.get_option(OptionKey('layout')) == 'mirror':
+ if isinstance(target, build.RunTarget):
+ # this produces no output, only a dummy top-level name
+ dirname = ''
+ elif self.environment.coredata.get_option(OptionKey('layout')) == 'mirror':
dirname = target.get_subdir()
else:
dirname = 'meson-out'