Code review comment for lp:~brandontschaefer/unity/support-Og-and-add-O2-compiler-option

Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Hey Jussi,

Thanks for the comment and blog post. That was very informative.

I put the -O2, cause I couldn't find any optimizations for the RELEASE build. I figured it would be best to have at lease -O2 if someone built it locally. If its added in manually later then I can remove it. (I wasn't aware of this).

Right, a while ago when they had instructions for building unity they set the build mode to "Debug"... so it should be either "debug" or "DEBUG" which makes sense.

As for the -Og, im not actually sure how reliably it is. Its a new option being added in gcc and from reading about it looked like something that would be nice to include for debug more only. It shouldn't clober anything, at lease from what it said... but yes we should look at how reliable this is!

-Og
    Optimize debugging experience. -Og enables optimizations that do not interfere with debugging. It 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.

Thanks again, Ill look at fixing some of these anti patterns in unity as well.

« Back to merge proposal