On Fri, Oct 15, 2021 at 07:44:08AM +0200, Rafael Sadowski wrote: [...] > > I can't figure out where '-O0' in the build comes from, for example: > > > > [10/140] c++ -Isrc/libcommon-gl.a.p -Isrc -I../glmark2-2021.02/src > > -I../glmark2-2021.02/src/scene-ideas -I../glmark2-2021.02/src/scene-terrain > > -I../glmark2-2021.02/src/glad/include -I../glmark2-2021.02/src/libmatrix > > -I/usr/local/include -I/usr/local/include/libpng16 -I/usr/X11R6/include > > -fcolor-diagnostics -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch > > -Wnon-virtual-dtor -std=c++14 -O0 '-DGLMARK_VERSION="2021.02"' > > '-DGLMARK_DATA_PATH="/usr/local/share/glmark2"' -O2 -pipe -fPIC > > -DUSE_EXCEPTIONS -DGLMARK2_USE_GL -MD -MQ > > src/libcommon-gl.a.p/libmatrix_mat.cc.o -MF > > src/libcommon-gl.a.p/libmatrix_mat.cc.o.d -o > > src/libcommon-gl.a.p/libmatrix_mat.cc.o -c > > ../glmark2-2021.02/src/libmatrix/mat.cc [...] > From meson.port.mk? > > MODMESON_CONFIGURE_ARGS += --buildtype=plain > > It looks like buildtype=plain set optimization to 0: > > https://mesonbuild.com/Builtin-options.html
Right, that must be it. I checked build logs with a few other meson ports (www/epiphany, x11/i3, and x11/picom) and they got the same '-O0' in there. So not really an issue with this specific port. All of the ports have the regular CFLAGS/CXXFLAGS afterwards that override it with '-O2'.
