From b10b405bb8d0dab2c5f4a2467d983df40892a1e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20=C3=96hman?= Date: Tue, 1 Oct 2024 15:38:37 +0000 Subject: [PATCH] Add NDEBUG flag to meson builds --- easybuild/easyblocks/generic/mesonninja.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/generic/mesonninja.py b/easybuild/easyblocks/generic/mesonninja.py index 03b4f2c86d..e9d5aa66f5 100644 --- a/easybuild/easyblocks/generic/mesonninja.py +++ b/easybuild/easyblocks/generic/mesonninja.py @@ -121,7 +121,7 @@ def configure_step(self, cmd_prefix=''): build_dir = self.cfg.get('build_dir') or self.start_dir cmd = ("%(preconfigopts)s %(configure_cmd)s --prefix %(installdir)s --buildtype %(buildtype)s %(configopts)s " - "--optimization %(optimization)s %(debug)s %(source_dir)s") % { + "--optimization %(optimization)s %(debug)s %(source_dir)s %(ndebug)s") % { 'configopts': self.cfg['configopts'], 'configure_cmd': configure_cmd, 'installdir': self.installdir, @@ -130,6 +130,7 @@ def configure_step(self, cmd_prefix=''): 'buildtype': self.build_type, 'optimization': self.optimization, 'debug': '--debug' if self.toolchain.options.get('debug', False) else '', + 'ndebug': '-Db_ndebug=true' if self.toolchain.options.get('noopt', None) else '', } res = run_shell_cmd(cmd) return res.output @@ -144,7 +145,7 @@ def build_step(self, verbose=False, path=None): if self.cfg['parallel']: parallel = "-j %s" % self.cfg['parallel'] - cmd = "%(prebuildopts)s %(build_cmd)s %(parallel)s %(buildopts)s" % { + cmd = "%(prebuildopts)s %(build_cmd)s -v %(parallel)s %(buildopts)s" % { 'buildopts': self.cfg['buildopts'], 'build_cmd': build_cmd, 'parallel': parallel,