pref: maintain order of 'debug' in compile defines as mod cache key depends on it

master
Joe Conigliaro 2022-06-12 02:22:04 +10:00
parent 5cea8d30fa
commit f3351b6a29
No known key found for this signature in database
GPG Key ID: C12F7136C08206F1
2 changed files with 5 additions and 3 deletions

View File

@ -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()

View File

@ -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
}