summaryrefslogtreecommitdiffstats
path: root/src/buildtools
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildtools')
-rw-r--r--src/buildtools/configure_host.pro3
-rw-r--r--src/buildtools/gn.pro17
-rw-r--r--src/buildtools/ninja.pro9
3 files changed, 18 insertions, 11 deletions
diff --git a/src/buildtools/configure_host.pro b/src/buildtools/configure_host.pro
index f1b3d47b0..dd0d3e327 100644
--- a/src/buildtools/configure_host.pro
+++ b/src/buildtools/configure_host.pro
@@ -23,6 +23,8 @@ contains(GN_TARGET_CPU, "arm")|contains(GN_TARGET_CPU, "mipsel")|contains(GN_TAR
else: contains(GN_V8_HOST_CPU, mips64el): GN_V8_HOST_CPU = "mipsel"
}
+GN_HOST_EXTRA_CPPFLAGS = $$(GN_HOST_TOOLCHAIN_EXTRA_CPPFLAGS)
+
# We always use the gcc_toolchain, because clang_toolchain is just
# a broken wrapper around it for Google's custom clang binaries.
GN_CONTENTS = \
@@ -34,6 +36,7 @@ GN_CONTENTS = \
" ld = \"$$which($$QMAKE_LINK)\" " \
" ar = \"$$which(ar)\" " \
" nm = \"$$which(nm)\" " \
+" extra_cppflags = \"$$GN_HOST_EXTRA_CPPFLAGS\" " \
" toolchain_args = { " \
" current_os = \"$$GN_OS\" " \
" current_cpu = \"$$GN_HOST_CPU\" " \
diff --git a/src/buildtools/gn.pro b/src/buildtools/gn.pro
index 829e7a31a..f66f4bd68 100644
--- a/src/buildtools/gn.pro
+++ b/src/buildtools/gn.pro
@@ -3,23 +3,28 @@ option(host_build)
!debug_and_release: CONFIG += release
-isQtMinimum(5, 8) {
- include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri)
- QT_FOR_CONFIG += webengine-private
-}
+include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri)
+QT_FOR_CONFIG += webengine webengine-private
build_pass|!debug_and_release {
- !qtConfig(system-gn): CONFIG(release, debug|release) {
+ !qtConfig(webengine-system-gn): CONFIG(release, debug|release) {
buildgn.target = build_gn
gn_args = $$gnArgs()
out = $$gnPath()
- !qtConfig(system-ninja): ninja_path = "--path $$ninjaPath()"
+ !qtConfig(webengine-system-ninja): ninja_path = "--path $$ninjaPath()"
# check if it is not already build
!exists($$out) {
mkpath($$dirname(out))
src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT")
gn_bootstrap = $$system_path($$absolute_path(chromium/tools/gn/bootstrap/bootstrap.py, $$src_3rd_party_dir))
+
gn_args = $$system_quote($$gn_args)
+ win32:isDeveloperBuild() {
+ # GN is always built in release mode, which conflicts with incremental linking when
+ # doing a developer build of WebEngine.
+ gn_args = $$replace(gn_args, "use_incremental_linking=true ", "")
+ }
+
gn_configure = $$system_quote($$gn_bootstrap) --shadow --gn-gen-args=$$gn_args $$ninja_path
!system("cd $$system_quote($$system_path($$dirname(out))) && $$pythonPathForSystem() $$gn_configure") {
error("GN build error!")
diff --git a/src/buildtools/ninja.pro b/src/buildtools/ninja.pro
index 1b17c6dfa..1b15bcb6b 100644
--- a/src/buildtools/ninja.pro
+++ b/src/buildtools/ninja.pro
@@ -2,13 +2,12 @@ TEMPLATE = aux
!debug_and_release: CONFIG += release
-isQtMinimum(5, 8) {
- include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri)
- QT_FOR_CONFIG += webengine-private
-}
+include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri)
+QT_FOR_CONFIG += webengine-private
+
build_pass|!debug_and_release {
- !qtConfig(system-ninja): CONFIG(release, debug|release) {
+ !qtConfig(webengine-system-ninja): CONFIG(release, debug|release) {
out = $$ninjaPath()
# check if it is not already build
!exists($$out) {