[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 04/13] build-sys: add AddressSanitizer when -
Re: [Qemu-devel] [PATCH v2 04/13] build-sys: add AddressSanitizer when --enable-debug if possible
Wed, 3 Jan 2018 19:10:48 +0100
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0
On 03/01/2018 19:02, Marc-André Lureau wrote:
> On Wed, Jan 3, 2018 at 6:52 PM, Peter Maydell <address@hidden> wrote:
>> On 2 January 2018 at 17:31, Paolo Bonzini <address@hidden> wrote:
>>> 2) I think removing -O2 from --enable-debug should be removed at the
>>> same time. That pretty much guarantees that nobody will use
>>> --enable-debug, and optimized builds are decently debuggable nowadays.
>>> The best would be to detect -Og, and add either -Og or -O1 depending on
>> Hmm. I use --enable-debug all the time and one of the reasons
>> I use it is that the optimized build is usually more pain
>> to debug with...
> -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.
> That should cover debugging nicely. Tbh, I am quite happy with
> compiler default to O0 when --enable-debug. Og doesn't give me much
> different experience.
> However, it produces false-positive warnings with gcc.
-O0 doesn't enable those warnings at all, because it would have even
more false positives. :)