Add flag to force debug mode

This commit is contained in:
Niko 2023-12-15 21:20:39 -07:00
parent 755d9e590f
commit b5cddefcfa
No known key found for this signature in database
GPG key ID: 3861E636EA1E0E2B
2 changed files with 5 additions and 2 deletions

View file

@ -138,10 +138,10 @@ fn main() {
config.define("WHISPER_METAL", "OFF");
}
if cfg!(debug_assertions) {
if cfg!(debug_assertions) || cfg!(feature = "force-debug") {
// debug builds are too slow to even remotely be usable,
// so we build with optimizations even in debug mode
config.define("CMAKE_BUILD_TYPE", "RelWithDebugInfo");
config.define("CMAKE_BUILD_TYPE", "RelWithDebInfo");
}
let destination = config.build();