Ah! Using qmake [...] -after QMAKE_CXXFLAGS-=-O3 QMAKE_CXXFLAGS-=-O2 QMAKE_CXXFLAGS-=-g QMAKE_CXXFLAGS+=-Os begins to have the intended effect, in part. The -O3 -g from qmodule.pri is now replaced with -Os, but something still appends a "-O2 -g" to the CXXFLAGS in the Makefiles. R.