aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Hawson <18214721+GertyP@users.noreply.github.com>2023-07-02 21:11:14 +0100
committerEli Schwartz <eschwartz@archlinux.org>2023-07-03 15:34:34 -0400
commitc34ee374a77fb2dffff90364506ac0cbbb1f00de (patch)
tree56b29057e9afcb36ffe0339c3b24ff7ac0a803d5
parent77d4db533fabb3308074793d684f5a97727b707e (diff)
downloadmeson-c34ee374a77fb2dffff90364506ac0cbbb1f00de.zip
meson-c34ee374a77fb2dffff90364506ac0cbbb1f00de.tar.gz
meson-c34ee374a77fb2dffff90364506ac0cbbb1f00de.tar.bz2
fix the use of setup --profile-self in combination with --genvslite
After the recent change to the backend `generate(...)` signature for '--genvslite', `profile.runctx('...')` needs to construct the correct cmd string and also extract the return result from `locals()`.
-rw-r--r--mesonbuild/msetup.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mesonbuild/msetup.py b/mesonbuild/msetup.py
index 6fee306..61d66f2 100644
--- a/mesonbuild/msetup.py
+++ b/mesonbuild/msetup.py
@@ -231,7 +231,7 @@ class MesonApp:
raise
cdf: T.Optional[str] = None
- captured_compile_args = None
+ captured_compile_args: T.Optional[dict] = None
try:
dumpfile = os.path.join(env.get_scratch_dir(), 'build.dat')
# We would like to write coredata as late as possible since we use the existence of
@@ -246,7 +246,9 @@ class MesonApp:
if self.options.profile:
fname = f'profile-{intr.backend.name}-backend.log'
fname = os.path.join(self.build_dir, 'meson-logs', fname)
- profile.runctx('intr.backend.generate()', globals(), locals(), filename=fname)
+ profile.runctx('gen_result = intr.backend.generate(capture, vslite_ctx)', globals(), locals(), filename=fname)
+ captured_compile_args = locals()['gen_result']
+ assert captured_compile_args is None or isinstance(captured_compile_args, dict)
else:
captured_compile_args = intr.backend.generate(capture, vslite_ctx)