diff options
author | Michal Klocek <michal.klocek@qt.io> | 2019-08-09 17:40:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-09-07 07:38:48 +0000 |
commit | 047d61f188aae3fe3ebc689900b8a5c9fb6e901d (patch) | |
tree | 8c12916d64de5139e09b2d9b83425f9821f1a96c /src | |
parent | 68539693fe022595b2e4fbecd448b2fca5e7d3e5 (diff) |
Add webengine-core feature
Create/split main configure for submodules. Now configure system knows when webenginecore
module is not going to be built and the user gets the feedback after the configure step
with the message:
The following modules are not being compiled in this configuration:
webenginecore
webengine
webenginewidgets
If a module is not built also features are not populated, therefore some tests
have to be moved to main configuration. This improves error reporting and prepares
landing for QtPdf modules.
Remove configure.prf and fix issues after config split.
Add makefile call to report errors. Now calling make also reports
issues.
Task-number: QTBUG-75840
Task-number: QTBUG-76606
Change-Id: I76944df4c5db6f4954c464e3741a8054cb10b40e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/buildtools/gn.pro | 2 | ||||
-rw-r--r-- | src/buildtools/ninja.pro | 2 | ||||
-rw-r--r-- | src/core/config/common.pri | 6 | ||||
-rw-r--r-- | src/core/config/windows.pri | 2 | ||||
-rw-r--r-- | src/core/configure.json | 276 | ||||
-rw-r--r-- | src/core/core_module.pro | 2 | ||||
-rw-r--r-- | src/core/gn_run.pro | 3 | ||||
-rw-r--r-- | src/src.pro | 59 |
8 files changed, 90 insertions, 262 deletions
diff --git a/src/buildtools/gn.pro b/src/buildtools/gn.pro index b6bf9cfc4..6b0a41fbe 100644 --- a/src/buildtools/gn.pro +++ b/src/buildtools/gn.pro @@ -3,7 +3,7 @@ option(host_build) !debug_and_release: CONFIG += release -include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) +include($$QTWEBENGINE_OUT_ROOT/src/qtwebengine-main-config.pri) QT_FOR_CONFIG += webenginecore-private build_pass|!debug_and_release { diff --git a/src/buildtools/ninja.pro b/src/buildtools/ninja.pro index 6382d6cfb..dee285b7e 100644 --- a/src/buildtools/ninja.pro +++ b/src/buildtools/ninja.pro @@ -2,7 +2,7 @@ TEMPLATE = aux !debug_and_release: CONFIG += release -include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) +include($$QTWEBENGINE_OUT_ROOT/src/qtwebengine-main-config.pri) QT_FOR_CONFIG += webenginecore-private build_pass|!debug_and_release { diff --git a/src/core/config/common.pri b/src/core/config/common.pri index edebdb33c..019b77c49 100644 --- a/src/core/config/common.pri +++ b/src/core/config/common.pri @@ -73,11 +73,11 @@ precompile_header { gn_args += enable_precompiled_headers=false } -CONFIG(release, debug|release):!isDeveloperBuild() { +CONFIG(release, debug|release):!qtConfig(webengine-developer-build) { gn_args += is_official_build=true } else { gn_args += is_official_build=false - !isDeveloperBuild(): gn_args += is_unsafe_developer_build=false + !qtConfig(webengine-developer-build): gn_args += is_unsafe_developer_build=false } CONFIG(release, debug|release) { @@ -116,7 +116,7 @@ optimize_size: gn_args += optimize_for_size=true sanitize_undefined: gn_args += is_ubsan=true is_ubsan_vptr=true } -qtConfig(webengine-v8-snapshot) { +qtConfig(webengine-v8-snapshot):qtConfig(webengine-v8-snapshot-support) { gn_args += v8_use_snapshot=true } else { gn_args += v8_use_snapshot=false diff --git a/src/core/config/windows.pri b/src/core/config/windows.pri index 385faeed0..dfa40e9dc 100644 --- a/src/core/config/windows.pri +++ b/src/core/config/windows.pri @@ -22,7 +22,7 @@ clang_cl { gn_args += is_clang=false use_lld=false } -isDeveloperBuild() { +qtConfig(webengine-developer-build) { gn_args += \ is_win_fastlink=true diff --git a/src/core/configure.json b/src/core/configure.json index d868e7f12..a93132326 100644 --- a/src/core/configure.json +++ b/src/core/configure.json @@ -5,7 +5,7 @@ "gui-private", "printsupport" ], - "condition": "module.gui", + "condition": "features.webengine-core", "testDir": "../../config.tests", "commandline": { "options": { @@ -56,18 +56,6 @@ "sources" : [{ "type": "pkgConfig", "args": "alsa" } ] }, - "webengine-dbus": { - "label": "d-bus", - "sources": [ - { "type": "pkgConfig", "args": "dbus-1" } - ] - }, - "webengine-fontconfig": { - "label": "fontconfig", - "sources": [ - { "type": "pkgConfig", "args": "fontconfig" } - ] - }, "webengine-libdrm": { "label": "libdrm", "sources": [ @@ -189,12 +177,6 @@ { "type": "pkgConfig", "args": "libwebp libwebpmux libwebpdemux" } ] }, - "webengine-nss": { - "label": "nss >= 3.26", - "sources": [ - { "type": "pkgConfig", "args": "nss >= 3.26" } - ] - }, "webengine-png": { "label": "libpng >= 1.6.0", "sources": [ @@ -276,12 +258,6 @@ "-lsnappy" ] }, - "webengine-x11" : { - "label" : "x11", - "sources": [ - { "type": "pkgConfig", "args": "x11" } - ] - }, "webengine-libvpx": { "label": "libvpx", "test": { @@ -305,77 +281,22 @@ "host": "true", "type": "compile" }, - "webengine-khr": { - "label": "khr", - "type": "compile", - "test": { - "include": "KHR/khrplatform.h", - "qmake" : [ - "!isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL", - "!isEmpty(QMAKE_INCDIR_OPENGL): INCLUDEPATH += $$QMAKE_INCDIR_OPENGL" - ] - } - }, - "webengine-winversion": { - "label": "winversion", - "type": "compile", - "test": { - "head" : [ - "#if !defined(__clang__) && _MSC_FULL_VER < 191426428", - "#error unsupported Visual Studio version", - "#endif" - ] - } - }, "webengine-protoc": { "label": "protoc", "type": "detectProtoc" }, - "webengine-python2": { - "label": "python2", - "type": "detectPython2", - "log": "location" - }, "webengine-host-pkg-config": { "label": "host pkg-config", "type": "detectHostPkgConfig", "log": "path" }, - "webengine-gperf": { - "label": "gperf", - "type": "detectGperf" - }, - "webengine-bison": { - "label": "bison", - "type": "detectBison" - }, - "webengine-flex": { - "label": "flex", - "type": "detectFlex" - }, - "webengine-ninja": { - "label": "system ninja", - "type": "detectNinja" - }, - "webengine-gn": { - "label": "system gn", - "type": "detectGn" - }, "webengine-embedded-build": { - "label": "embedded", - "type": "embedded" + "label": "embedded build", + "type": "detectEmbedded" }, - "webengine-glibc": { - "label": "glibc > 2.26", - "type": "compile", - "test": { - "include": "features.h", - "tail": [ - "#if __GLIBC__ < 2 || __GLIBC_MINOR__ < 27", - "#error glibc versions below 2.27 are not supported", - "#endif" - ] - } + "webengine-developer-build": { + "label": "developer build", + "type": "detectDeveloperBuild" }, "webengine-sanitizer": { "label" : "sanitizer support", @@ -399,18 +320,7 @@ "flag": "-z,noexecstack" } }, - "features": { - "webengine-system-fontconfig": { - "label": "fontconfig", - "condition": "libs.webengine-fontconfig", - "output": [ "privateFeature" ] - }, - "webengine-system-dbus": { - "label": "dbus", - "condition": "libs.webengine-dbus", - "output": [ "privateFeature" ] - }, "webengine-system-libdrm": { "label": "libdrm", "condition": "libs.webengine-libdrm", @@ -481,37 +391,6 @@ "condition": "config.unix && features.system-jpeg && libs.webengine-jpeglib", "output": [ "privateFeature" ] }, - "webengine-python2": { - "label": "python2", - "condition": "tests.webengine-python2", - "output": [ - "privateFeature", - { "type": "varAssign", "name": "QMAKE_PYTHON2", "value": "tests.webengine-python2.location" } - ] - }, - "webengine-host-pkg-config": { - "label": "host-pkg-config", - "condition": "config.unix && tests.webengine-host-pkg-config", - "output": [ - "privateFeature", - { "type": "varAssign", "name": "QMAKE_PKG_CONFIG_HOST", "value": "tests.webengine-host-pkg-config.path" } - ] - }, - "webengine-gperf": { - "label": "gperf", - "condition": "tests.webengine-gperf", - "output": [ "privateFeature" ] - }, - "webengine-bison": { - "label": "bison", - "condition": "tests.webengine-bison", - "output": [ "privateFeature" ] - }, - "webengine-flex": { - "label": "flex", - "condition": "tests.webengine-flex", - "output": [ "privateFeature" ] - }, "webengine-embedded-build": { "label": "Embedded build", "purpose": "Enables the embedded build configuration.", @@ -520,6 +399,12 @@ "autoDetect": "tests.webengine-embedded-build", "output": [ "privateFeature" ] }, + "webengine-developer-build": { + "label": "Developer build", + "purpose": "Enables the developer build configuration.", + "autoDetect": "tests.webengine-developer-build", + "output": [ "privateFeature" ] + }, "webengine-alsa": { "label": "Use ALSA", "condition": "config.unix && libs.webengine-alsa", @@ -536,11 +421,6 @@ "condition": "!config.unix || !features.cross_compile || arch.arm64 || tests.webengine-host-compiler", "output": [ "privateFeature" ] }, - "webengine-system-khr" : { - "label": "khr", - "condition": "config.unix && tests.webengine-khr", - "output": [ "privateFeature" ] - }, "webengine-system-libvpx" : { "label": "libvpx", "condition": "config.unix && libs.webengine-libvpx", @@ -551,11 +431,6 @@ "condition": "config.unix && libs.webengine-snappy", "output": [ "privateFeature" ] }, - "webengine-winversion" : { - "label": "winversion", - "condition": "config.win32 && tests.webengine-winversion", - "output": [ "privateFeature" ] - }, "webengine-geolocation": { "label": "Geolocation", "condition": "module.positioning", @@ -632,11 +507,6 @@ "autoDetect": "!features.webengine-embedded-build", "output": [ "privateFeature" ] }, - "webengine-system-nss": { - "label": "nss", - "condition": "config.unix && !config.darwin && libs.webengine-nss", - "output": [ "privateFeature" ] - }, "webengine-system-libwebp": { "label": "libwebp, libwebpmux and libwebpdemux", "autoDetect": "config.unix", @@ -667,22 +537,6 @@ "condition": "libs.webengine-re2", "output": [ "privateFeature" ] }, - "webengine-system-ninja": { - "label": "Use System Ninja", - "condition": "tests.webengine-ninja", - "output": [ "privateFeature" ] - }, - "webengine-system-gn": { - "label": "Use System Gn", - "autoDetect": false, - "condition": "tests.webengine-gn", - "output": [ "privateFeature" ] - }, - "webengine-system-glibc": { - "label": "glibc", - "condition": "config.linux && tests.webengine-glibc", - "output": [ "privateFeature" ] - }, "webengine-system-libxml2": { "label": "libxml2 and libxslt", "condition": "config.unix && libs.webengine-libxml2", @@ -699,11 +553,6 @@ "condition": "config.unix && features.system-freetype && libs.webengine-freetype", "output": [ "privateFeature" ] }, - "webengine-system-x11" : { - "label": "x11", - "condition": "config.unix && libs.webengine-x11", - "output": [ "privateFeature" ] - }, "webengine-ozone-x11" : { "label": "Support qpa-xcb", "condition": "config.unix @@ -757,26 +606,6 @@ "report": [ { "type": "warning", - "condition": "!features.webengine-python2", - "message": "Python version 2 (2.7.5 or later) is required to build QtWebEngine." - }, - { - "type": "warning", - "condition": "!features.webengine-gperf", - "message": "gperf is required to build QtWebEngine." - }, - { - "type": "warning", - "condition": "!features.webengine-bison", - "message": "bison is required to build QtWebEngine." - }, - { - "type": "warning", - "condition": "!features.webengine-flex", - "message": "flex is required to build QtWebEngine." - }, - { - "type": "warning", "condition": "config.sanitizer && !tests.webengine-sanitizer && !features.webengine-sanitizer", "message": "Qt WebEngine cannot be built with the chosen sanitizer configuration. Check config.log for details or use -feature-webengine-sanitizer to force the build." }, @@ -794,14 +623,46 @@ "type": "warning", "condition": "config.linux && features.webengine-embedded-build && !features.webengine-system-ffmpeg && arch.arm && !features.webengine-arm-thumb", "message": "Thumb instruction set is required to build ffmpeg for QtWebEngine." + }, + { + "type": "warning", + "condition": "config.linux && features.webengine-v8-snapshot && !features.webengine-v8-snapshot-support", + "message": "V8 snapshot cannot be built. Most likely, the 32-bit host compiler does not work. Please make sure you have 32-bit devel environment installed." } ], "summary": [ { + "section": "Optional system libraries used", + "condition": "config.unix", + "entries": [ + "webengine-system-re2", + "webengine-system-icu", + "webengine-system-libwebp", + "webengine-system-opus", + "webengine-system-ffmpeg", + "webengine-system-libvpx", + "webengine-system-snappy", + "webengine-system-glib", + "webengine-system-zlib", + "webengine-system-minizip", + "webengine-system-libevent", + "webengine-system-jsoncpp", + "webengine-system-protobuf", + "webengine-system-libxml2", + "webengine-system-lcms2", + "webengine-system-png", + "webengine-system-jpeg", + "webengine-system-harfbuzz", + "webengine-system-freetype" + ] + }, + { "section": "Qt WebEngineCore", + "condition": "features.webengine-core", "entries": [ "webengine-embedded-build", + "webengine-developer-build", "webengine-full-debug-info", "webengine-pepper-plugins", "webengine-printing-and-pdf", @@ -809,7 +670,6 @@ "webengine-spellchecker", "webengine-native-spellchecker", "webengine-webrtc", - "webengine-system-ninja", "webengine-geolocation", "webengine-webchannel", "webengine-v8-snapshot", @@ -869,54 +729,6 @@ "type": "macosToolchainVersion", "args": "deploymentTarget", "condition": "config.macos" - }, - { - "section": "Optional system libraries used", - "condition": "config.unix", - "entries": [ - "webengine-system-re2", - "webengine-system-icu", - "webengine-system-libwebp", - "webengine-system-opus", - "webengine-system-ffmpeg", - "webengine-system-libvpx", - "webengine-system-snappy", - "webengine-system-glib", - "webengine-system-zlib", - "webengine-system-minizip", - "webengine-system-libevent", - "webengine-system-jsoncpp", - "webengine-system-protobuf", - "webengine-system-libxml2", - "webengine-system-lcms2", - "webengine-system-png", - "webengine-system-jpeg", - "webengine-system-harfbuzz", - "webengine-system-freetype" - ] - }, - { - "section": "Required system libraries", - "condition": "config.unix && !config.macos", - "entries": [ - "webengine-system-fontconfig", - "webengine-system-dbus", - "webengine-system-nss", - "webengine-system-khr", - "webengine-system-glibc" - ] - }, - { - "section": "Required system libraries for qpa-xcb", - "condition": "config.unix && !config.macos", - "entries": [ - "webengine-system-x11", - "webengine-system-libdrm", - "webengine-system-xcomposite", - "webengine-system-xcursor", - "webengine-system-xi", - "webengine-system-xtst" - ] } ] } diff --git a/src/core/core_module.pro b/src/core/core_module.pro index b220af4a5..4b9268e1a 100644 --- a/src/core/core_module.pro +++ b/src/core/core_module.pro @@ -63,7 +63,7 @@ CONFIG *= no_smart_library_merge osx { LIBS_PRIVATE += -Wl,-force_load,$${api_library_path}$${QMAKE_DIR_SEP}lib$${api_library_name}.a } else: win32 { - !isDeveloperBuild() { + !qtConfig(webengine-developer-build) { # Remove unused functions and data in debug non-developer builds, because the binaries will # be smaller in the shipped packages. QMAKE_LFLAGS += /OPT:REF diff --git a/src/core/gn_run.pro b/src/core/gn_run.pro index 0219a2be9..94c1ede1c 100644 --- a/src/core/gn_run.pro +++ b/src/core/gn_run.pro @@ -1,5 +1,6 @@ +include($$QTWEBENGINE_OUT_ROOT/src/qtwebengine-main-config.pri) include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) -QT_FOR_CONFIG += webenginecore-private +QT_FOR_CONFIG += webenginecore-private core-private gui-private TEMPLATE = aux diff --git a/src/src.pro b/src/src.pro index 8bf014dea..1ace7a44b 100644 --- a/src/src.pro +++ b/src/src.pro @@ -1,34 +1,49 @@ -include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) -include($$QTWEBENGINE_OUT_ROOT/src/webengine/qtwebengine-config.pri) -include($$QTWEBENGINE_OUT_ROOT/src/webenginewidgets/qtwebenginewidgets-config.pri) -QT_FOR_CONFIG += webenginecore webenginecore-private webengine-private webenginewidgets-private +load(platform) + +include($$QTWEBENGINE_OUT_ROOT/src/qtwebengine-main-config.pri) TEMPLATE = subdirs -process.depends = core -webengine.depends = core -webenginewidgets.depends = core webengine -webengine_plugin.subdir = webengine/plugin -webengine_plugin.target = sub-webengine-plugin -webengine_plugin.depends = webengine +isWebEngineCoreBuild():qtConfig(webengine-core) { + include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) + include($$QTWEBENGINE_OUT_ROOT/src/webengine/qtwebengine-config.pri) + include($$QTWEBENGINE_OUT_ROOT/src/webenginewidgets/qtwebenginewidgets-config.pri) + QT_FOR_CONFIG += webenginecore webenginecore-private webengine-private webenginewidgets-private + + process.depends = core + webengine.depends = core + webenginewidgets.depends = core webengine + webengine_plugin.subdir = webengine/plugin + webengine_plugin.target = sub-webengine-plugin + webengine_plugin.depends = webengine -core.depends = buildtools + core.depends = buildtools -SUBDIRS += buildtools \ - core \ - process + SUBDIRS += buildtools \ + core \ + process -qtConfig(webengine-spellchecker):!qtConfig(webengine-native-spellchecker):!cross_compile { + qtConfig(webengine-spellchecker):!qtConfig(webengine-native-spellchecker):!cross_compile { SUBDIRS += qwebengine_convert_dict qwebengine_convert_dict.subdir = tools/qwebengine_convert_dict qwebengine_convert_dict.depends = core -} + } -qtConfig(webengine-qml) { - SUBDIRS += webengine -} + qtConfig(webengine-qml) { + SUBDIRS += webengine + } -qtConfig(webengine-widgets) { - SUBDIRS += plugins webenginewidgets - plugins.depends = webenginewidgets + qtConfig(webengine-widgets) { + SUBDIRS += plugins webenginewidgets + plugins.depends = webenginewidgets + } +} else { + !isEmpty(skipBuildReason):!build_pass { + log(QtWebEngine will not be built. $${skipBuildReason} $${EOL}) + errorbuild.commands = @echo QtWebEngine will not be built. $${skipBuildReason} + errorbuild.CONFIG = phony + QMAKE_EXTRA_TARGETS += errorbuild + first.depends += errorbuild + QMAKE_EXTRA_TARGETS += first + } } |