diff --git a/bindgen/gen_nim.py b/bindgen/gen_nim.py index 14d6297d1..4946f0531 100644 --- a/bindgen/gen_nim.py +++ b/bindgen/gen_nim.py @@ -566,6 +566,8 @@ def gen_extra(inp): # l('') c_source_path = '/'.join(c_source_paths[inp['prefix']].split('/')[3:]) l('{.passc:"-DSOKOL_NIM_IMPL".}') + l('when defined(release):') + l(' {.passc:"-DNDEBUG".}') l(f'{{.compile:"{c_source_path}".}}') def gen_module(inp, dep_prefixes):