Re: [hatari-devel] fixing errors reported by GCC 10 -fanalyzer

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Am Wed, 13 May 2020 19:54:45 +0300
schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:

> Hi,
> 
> On 5/12/20 10:28 PM, Thomas Huth wrote:
> > Am Mon, 11 May 2020 18:05:17 +0300
> > schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:  
> >> But I strongly think that daily snapshot builds
> >> and Hatari development versions should default to
> >> building with asserts.  
> > 
> > Right. I've enabled the Debug build type now for most of the CI
> > pipelines.
> >   
> >> Thomas is defaulting to debugrelease target
> >> instead of release target enough?  
> > 
> > What's the debugrelease target? I can't find any cmake documentation
> > about that...? Running "cmake
> > -DCMAKE_BUILD_TYPE:STRING=debugrelease ." simply seems to compile
> > without any CFLAGS at all, so this build type does not seem to
> > exist?  
> 
> Sorry, I meant "RelWithDebInfo", see:
> https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html
> 
> But I don't remember whether it enables also
> asserts in addition to providing binaries with
> debug symbols.

That does not work - RelWithDebInfo also sets -DNDEBUG.

I guess we'd need to set up our own build type to compile with -O2 but
without -DNDEBUG. But since the CI now has assert()s enabled, too, and
since Christer also builds Debug executables, let's continue with the
current way first - we can still revisit this topic later if this does
not work out as expected.

 Thomas



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/