Skip to content

Commit

Permalink
Add NDEBUG flag to meson builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Micket committed Oct 1, 2024
1 parent 17909f2 commit b10b405
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions easybuild/easyblocks/generic/mesonninja.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand All @@ -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,
Expand Down

0 comments on commit b10b405

Please sign in to comment.