CMake: Set DWARF version before the debug information level
Setting the DWARF version after having selected which level of debug information to generate apparently undoes some settings again. Doing the reverse apparently keeps both the version and the debug level setting, resulting in a significantly smaller disk image size.
This commit is contained in:
parent
3fbebe73a8
commit
ef7f343e95
Notes:
sideshowbarker
2024-07-17 01:23:08 +09:00
Author: https://github.com/timschumi Commit: https://github.com/SerenityOS/serenity/commit/ef7f343e95 Pull-request: https://github.com/SerenityOS/serenity/pull/17277 Reviewed-by: https://github.com/ADKaster ✅
1 changed files with 3 additions and 1 deletions
|
@ -27,11 +27,13 @@ add_compile_options(-fsized-deallocation)
|
|||
add_compile_options(-fstack-clash-protection)
|
||||
add_compile_options(-fstack-protector-strong)
|
||||
add_link_options(-fstack-protector-strong)
|
||||
add_compile_options(-g1)
|
||||
|
||||
# FIXME: Remove this once DWARF revision 5 is supported
|
||||
add_compile_options(-gdwarf-4)
|
||||
|
||||
# Note: This needs to be set _after_ setting the DWARF version, otherwise we end up generating more debug information than we need.
|
||||
add_compile_options(-g1)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
add_compile_options(-Wno-literal-suffix)
|
||||
add_compile_options(-Wno-maybe-uninitialized)
|
||||
|
|
Loading…
Add table
Reference in a new issue