diff --git a/vlib/v/pref/default.v b/vlib/v/pref/default.v index 03fa934a4f..0d89451a6a 100644 --- a/vlib/v/pref/default.v +++ b/vlib/v/pref/default.v @@ -92,11 +92,16 @@ pub fn (mut p Preferences) fill_with_defaults() { } else { // enable the GC by default p.gc_mode = .boehm_full_opt + // NOTE: these are added to p.compile_defines[_all] + // more than once when building modules for usecache p.parse_define('gcboehm') p.parse_define('gcboehm_full') p.parse_define('gcboehm_opt') } } + if p.is_debug { + p.parse_define('debug') + } if p.os == ._auto { // No OS specifed? Use current system p.os = get_host_os() diff --git a/vlib/v/pref/pref.v b/vlib/v/pref/pref.v index 5adbfca353..4a2e52beb9 100644 --- a/vlib/v/pref/pref.v +++ b/vlib/v/pref/pref.v @@ -733,9 +733,6 @@ pub fn parse_args_and_show_errors(known_external_commands []string, args []strin } } } - if res.is_debug { - res.parse_define('debug') - } if command == 'crun' { res.is_crun = true }