Hi, I haven't seen anyone mention -Og in this thread yet: "-Og enables optimizations that do not interfere with debugging." Was added in GCC 4.8.
Regards //Ernst 2017-11-06 13:25 GMT+01:00 Eero Tamminen <eero.t.tammi...@intel.com>: > Hi, > > On 04.11.2017 03:28, Christian Schmidbauer wrote: >>> >>> On Thu, Nov 2, 2017 at 11:45 AM, Andres Rodriguez <andre...@gmail.com> >>> wrote: > > [...] >>> >>> In the autotools system we have today, we have --enable-debug, which >>> adds -g and -O0 if some -g* and -O* are not already in CFLAGS. It also >>> adds -DDEBUG which turns on lots of debugging code that has extra >>> runtime cost, like nir_validate. Without --enable-debug, we pass >>> -DNDEBUG to disable assertions, and otherwise use autotools' default >>> CFLAGS (-g -O2) or whatever the user specified. >>> >>> Meson's debug build should correspond to --enable-debug. >>> debugoptimized vs release is a little less obvious. Perhaps >>> debugoptimized should default to -g -O2 but leave assertions enabled, >>> and release should default to -g -O2 -DNDEBUG? >>> >>> Under that system, I agree that the default build type should be >>> debugoptimized. >> >> >> Does this mean that it is not easily possible to keep asserations in >> general but remove heavy extra runtime cost (like nir_validate)? >> >> FWIW, it would be great if there would be a "debugoptimized" which >> tries to keep the overhead minimal and still allow debugging in a >> sensible, but not complete, way. > > > I'd like that too. > > > - Eero > > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev