Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


On 01/15/2015 01:47 PM, Luke Deller wrote:
Yesterday I floated the idea on IRC of using this with --enable-debug
rather than -O0 if available, and some feedback was that it enables gcc
to report extra warnings which would be a good thing.

It /potentially/ enables GCC to emit more (useful) warnings, as some of GCC's warnings are known to be only emitted when certain optimizations are enabled. The benefit of having such warnings also emitted during debug builds would be that developers would be made aware of them more quickly.

(As it turns out, GCC unfortunately also emits some false warnings at -Og which it would not emit at neither -O0 nor -O2. That, of course, is not considered useful.)

So I guess this means we couldn't incorporate -Og until all these new
warnings are fixed right?

Yes, please get any warning fallout addressed beforehand (and I see you're already doing that with <https://gerrit.libreoffice.org/#/c/13929/> "Avoid false 'maybe-uninitialized' warnings").

Any other thoughts on whether this is a good idea to pursue?  One fear
was that it might slow down compilation, but it doesn't actually seem to
slow down "make clean && make" much at all for me.  I'll get some proper
timing measurements.

My "-Og potentially makes the build time longer, but [...]" was meant in direct response to your "to make it run faster, make the build smaller" (which, in turn, was a reply to "why would one want to enable optimizations in a debug build?"). I would not worry too much if it actually does make the build a little slower, but measuring it of course can't hurt.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.