Skip to content

(build): update cxx/link flags for faster and better gdb experience

Description

Modify flags.cmake to add some flags:

CXX Debug

  • -ggdb3 allows macro expansion and other useful things`
  • -ggnu-pubnames generates data to ease gdb indexing by the linker`

Link

  • -fuse-ld=gold will make use of gold linker, which is faster and allows --gdb-index
  • -Wl,--gdb-index pass the --gdb-index option to the linker to generate indexes that will speedup gdb start

Closes #781 (closed)

How to test it?

Build everything (Debug + Release), launch all tests

Results:

Launch dicomXplorer with a break point in SView::starting() (Gcc):

  • before: ~16s
  • after: ~9s
  • with -Og: ~8s

Launch SightViewer with a break point in SParameters::starting() (CLang):

  • before: ~24s
  • after (gold): ~9s
  • after (ldd): ~9s
Edited by Didier WECKMANN

Merge request reports