[Interest] Optimizations in debug configuration

Thiago Macieira thiago.macieira at intel.com
Fri Sep 23 04:31:48 CEST 2016


On sexta-feira, 23 de setembro de 2016 01:52:28 PDT Konstantin Shegunov wrote:
> Hello,
> What's the rationale of having -O2 for debug builds on Linux (g++)? As the
> compiler moves the assembly around it becomes hell stepping through with
> the debugger. Is the flag passed intentionally (and why)?

The flag is not passed to the build.

Debug builds use -O0 on Linux.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Interest mailing list