Add flag to force debug mode
This commit is contained in:
parent
755d9e590f
commit
b5cddefcfa
2 changed files with 5 additions and 2 deletions
|
|
@ -41,11 +41,14 @@ include = [
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
default = ["force-debug"]
|
||||||
|
|
||||||
coreml = []
|
coreml = []
|
||||||
cuda = []
|
cuda = []
|
||||||
opencl = []
|
opencl = []
|
||||||
openblas = []
|
openblas = []
|
||||||
metal = []
|
metal = []
|
||||||
|
force-debug = []
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
cmake = "0.1"
|
cmake = "0.1"
|
||||||
|
|
|
||||||
|
|
@ -138,10 +138,10 @@ fn main() {
|
||||||
config.define("WHISPER_METAL", "OFF");
|
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,
|
// debug builds are too slow to even remotely be usable,
|
||||||
// so we build with optimizations even in debug mode
|
// 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();
|
let destination = config.build();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue