diff --git a/vlib/v/builder/cc.v b/vlib/v/builder/cc.v index d3f6e54642..fae4c06173 100644 --- a/vlib/v/builder/cc.v +++ b/vlib/v/builder/cc.v @@ -302,6 +302,7 @@ fn (mut v Builder) setup_ccompiler_options(ccompiler string) { // have much better performance when NDEBUG is defined // See also http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf ccoptions.args << '-DNDEBUG' + ccoptions.args << '-DNO_DEBUGGING' // for BDWGC } if v.pref.sanitize { ccoptions.args << '-fsanitize=leak' diff --git a/vlib/v/builder/msvc_windows.v b/vlib/v/builder/msvc_windows.v index efabe1048f..1685613ade 100644 --- a/vlib/v/builder/msvc_windows.v +++ b/vlib/v/builder/msvc_windows.v @@ -291,6 +291,7 @@ pub fn (mut v Builder) cc_msvc() { } else { a << '/MD' a << '/DNDEBUG' + a << '/DNO_DEBUGGING' if !v.ccoptions.debug_mode { v.pref.cleanup_files << out_name_pdb v.pref.cleanup_files << app_dir_out_name + '.pdb' @@ -458,6 +459,7 @@ fn (mut v Builder) build_thirdparty_obj_file_with_msvc(_mod string, path string, oargs << '/O2' oargs << '/MD' oargs << '/DNDEBUG' + oargs << '/DNO_DEBUGGING' } } else { oargs << '/MDd'