mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
config/optimize: build debug with -Og instead of -0s
If we build with `-Os` some vars are missing in backtraces and will be listed as `<optimized out>` - https://github.com/PCSX2/pcsx2/issues/5226#issuecomment-1036987320 ``` Optimize debugging experience. -Og should be the optimization level of choice for the standard edit-compile-debug cycle, offering a reasonable level of optimization while maintaining fast compilation and a good debugging experience. It is a better choice than -O0 for producing debuggable code because some compiler passes that collect debug information are disabled at -O0. Like -O0, -Og completely disables a number of optimization passes so that individual options controlling them have no effect. Otherwise -Og enables all -O1 optimization flags except for those that may interfere with debugging: ``` - https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
This commit is contained in:
parent
720d9a5368
commit
8893cf7106
@ -40,11 +40,11 @@ CXXFLAGS_OPTIM_SPEED="$CFLAGS_OPTIM_SPEED"
|
||||
CFLAGS_OPTIM_SIZE="-Os -fomit-frame-pointer -DNDEBUG"
|
||||
CXXFLAGS_OPTIM_SIZE="$CFLAGS_OPTIM_SIZE"
|
||||
# debug settings
|
||||
CFLAGS_OPTIM_DEBUG="-ggdb -Os"
|
||||
CFLAGS_OPTIM_DEBUG="-ggdb -Og"
|
||||
CXXFLAGS_OPTIM_DEBUG="$CFLAGS_OPTIM_DEBUG"
|
||||
LDFLAGS_OPTIM_DEBUG="-ggdb"
|
||||
# split debug settings (requires gold)
|
||||
CFLAGS_OPTIM_DEBUG_SPLIT="-gsplit-dwarf -Os"
|
||||
CFLAGS_OPTIM_DEBUG_SPLIT="-gsplit-dwarf -Og"
|
||||
CXXFLAGS_OPTIM_DEBUG_SPLIT="$CFLAGS_OPTIM_DEBUG_SPLIT"
|
||||
LDFLAGS_OPTIM_DEBUG_SPLIT="-Wl,--gdb-index"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user