fix: lake: use -O0 for debug builds (#11062)
This PR changes Lake's debug build type to use `-O0` instead of `-Og` when compiling C code. `-Og` was found to be insufficient for debugging compiled Lean code -- relevant code was stilled optimized out.
This commit is contained in:
parent
2c45d55683
commit
1aca181fe2
1 changed files with 2 additions and 2 deletions
|
|
@ -79,7 +79,7 @@ public inductive BuildType
|
|||
Debug optimization, asserts enabled, custom debug code enabled, and
|
||||
debug info included in executable (so you can step through the code with a
|
||||
debugger and have address to source-file:line-number translation).
|
||||
For example, passes `-Og -g` when compiling C code.
|
||||
For example, passes `-O0 -g` when compiling C code.
|
||||
-/
|
||||
| debug
|
||||
/--
|
||||
|
|
@ -112,7 +112,7 @@ public instance : Max BuildType := maxOfLe
|
|||
|
||||
/-- The arguments to pass to `leanc` based on the build type. -/
|
||||
public def leancArgs : BuildType → Array String
|
||||
| debug => #["-Og", "-g"]
|
||||
| debug => #["-O0", "-g"]
|
||||
| relWithDebInfo => #["-O3", "-g", "-DNDEBUG"]
|
||||
| minSizeRel => #["-Os", "-DNDEBUG"]
|
||||
| release => #["-O3", "-DNDEBUG"]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue