From 03a8f35031c9ae0ded162f8b228c5b3f04643632 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Mon, 29 Jul 2024 21:22:37 -0400 Subject: [PATCH] tests: nasm: make it easier to debug generator() style build By default, we build with debug info which can be useful for investigating why a test segfaults instead of either passing or failing. The nasm language hooks this up, but using nasm as a generator program does not. Bug: https://bugs.gentoo.org/936911 --- test cases/nasm/1 configure file/meson.build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test cases/nasm/1 configure file/meson.build b/test cases/nasm/1 configure file/meson.build index fac46a687..abe7bb30f 100644 --- a/test cases/nasm/1 configure file/meson.build +++ b/test cases/nasm/1 configure file/meson.build @@ -24,10 +24,16 @@ conf = configuration_data() conf.set('HELLO', 0) +debug_nasm = [] +if get_option('debug') + debug_nasm = ['-g'] +endif + asm_gen = generator(nasm, output : '@BASENAME@.o', arguments : [ '-f', asm_format, + debug_nasm, '-i', meson.current_source_dir() + '/', '-i', join_paths(meson.current_source_dir(), ''), '-P', join_paths(meson.current_build_dir(), 'config.asm'),