[Interest] Doing a leanest-possible QtWebEngine build

René J.V. Bertin rjvbertin at gmail.com
Thu Dec 29 14:42:51 CET 2016


On Thursday December 29 2016 10:23:05 Allan Sandfeld Jensen wrote:

>Os instead of -O2 however. Just invoke qmake in qtwebengine with 
>WEBENGiNE_CONFIG+=reduce_binary_size (this is also default for embedded 
>builds).

Sadly that doesn't seem to do the trick. At least not when I build against Qt 5.6.2 but how big is the likelihood that that changes anything in this aspect?

#############################################################################
# Makefile for building: libqwebengineview.so
# Generated by qmake (3.0) (Qt 5.6.2)
# Project:  /opt/local/.../work/qtwebengine-opensource-src-5.7.1/src/plugins/qwebengineview/qwebengineview.pro
# Template: lib
# Command: /opt/local/libexec/qt5/bin/qmake PREFIX=/opt/local CONFIG+=release -Wall QMAKE_LINK=/usr/bin/c++ WEBENGINE_CONFIG+=use_proprietary_codecs CONFIG-=debug WEBENGINE_CONFIG+=reduce_binary_size WEBENGINE_CONFIG+=use_system_snappy WEBENGINE_CONFIG+=use_system_icu WEBENGINE_CONFIG+=use_system_ffmpeg WEBENGINE_CONFIG+=use_system_libxml -o Makefile /opt/local/.../work/qtwebengine-opensource-src-5.7.1/src/plugins/qwebengineview/qwebengineview.pro
#############################################################################

MAKEFILE      = Makefile

####### Compiler, tools and options

CC            = /usr/bin/cc
CXX           = /usr/bin/c++
DEFINES       = -DQT_NO_LIBINPUT -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_WEBENGINEWIDGETS_LIB -DQT_WEBENGINECORE_LIB -DQT_DESIGNER_LIB -DQT_UIPLUGIN_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_WEBCHANNEL_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_POSITIONING_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS
CFLAGS        = -m64 -pipe -O3 -g -O2 -g -fvisibility=hidden -fno-exceptions -Wall -W -D_REENTRANT -fPIC $(DEFINES)
CXXFLAGS      = -m64 -pipe -O3 -g -O2 -g -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -D_REENTRANT -fPIC $(DEFINES)
------------------------

> The point is that you may be removing flags that were in the mkspec or added
> by  other .prf files loaded before your file or the command-line.
> You're not supposed to tinker with QMAKE_CXXFLAGS_RELEASE. If you do and
> you  break the build, you get to keep the pieces.

That's why I just tried a series of QMAKE_CXXFLAGS_RELEASE-={-O3,-O2,-g} followed by QMAKE_CXXFLAGS_RELEASE+=-Os . 

Also didn't have the effect hoped for. Nor does `QMAKE_CXXFLAGS_RELAESE=-Os` .

Is there support for env. variables in whatever .pr* file contains those local default "-O3 -g" options?

R



More information about the Interest mailing list