summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/buildtools/configure_host.pro16
-rw-r--r--src/buildtools/configure_target.pro12
-rw-r--r--tools/qmake/mkspecs/features/configure.prf4
3 files changed, 18 insertions, 14 deletions
diff --git a/src/buildtools/configure_host.pro b/src/buildtools/configure_host.pro
index d8d731df7..0e113543d 100644
--- a/src/buildtools/configure_host.pro
+++ b/src/buildtools/configure_host.pro
@@ -5,11 +5,20 @@ TEMPLATE = aux
option(host_build)
GN_HOST_CPU = $$gnArch($$QMAKE_HOST.arch)
+GN_TARGET_CPU = $$gnArch($$WEBENGINE_ARCH)
GN_OS = $$gnOS()
clang: GN_CLANG = true
else: GN_CLANG = false
+GN_V8_HOST_CPU = $$GN_HOST_CPU
+contains(GN_TARGET_CPU, "arm")|contains(GN_TARGET_CPU, "mips")|contains(GN_TARGET_CPU, "x86") {
+ # The v8 snapshot need a host that matches bitwidth, so we build makesnapshot to 32-bit variants of host.
+ contains(GN_V8_HOST_CPU, x64): GN_V8_HOST_CPU = "x86"
+ else: contains(GN_V8_HOST_CPU, arm64): GN_V8_HOST_CPU = "arm"
+ else: contains(GN_V8_HOST_CPU, mips64): GN_V8_HOST_CPU = "mips"
+}
+
# We always use the gcc_toolchain, because clang_toolchain is just
# a broken wrapper around it for Google's custom clang binaries.
GN_CONTENTS = \
@@ -33,8 +42,11 @@ GN_CONTENTS = \
" ar = \"$$which(ar)\" " \
" nm = \"$$which(nm)\" " \
" toolchain_args = { " \
-" current_os = \"$$GN_OS\" "
-# The v8_snapshot toolchain is finished by configure_target.pro
+" current_os = \"$$GN_OS\" " \
+" current_cpu = \"$$GN_V8_HOST_CPU\" " \
+" v8_current_cpu = \"$$GN_TARGET_CPU\" " \
+" } " \
+" } "
GN_FILE = $$OUT_PWD/../toolchain/BUILD.gn
!build_pass {
diff --git a/src/buildtools/configure_target.pro b/src/buildtools/configure_target.pro
index 1750f4e6f..54841bf51 100644
--- a/src/buildtools/configure_target.pro
+++ b/src/buildtools/configure_target.pro
@@ -7,19 +7,7 @@ GN_OS = $$gnOS()
clang: GN_CLANG = true
else: GN_CLANG = false
-GN_V8_HOST_CPU = $$gnArch($$QMAKE_HOST.arch)
-contains(GN_CPU, "arm")|contains(GN_CPU, "mips")|contains(GN_CPU, "x86") {
- # The v8 snapshot need a host that matches bitwidth, so we build makesnapshot to 32-bit variants of host.
- contains(GN_V8_HOST_CPU, x64): GN_V8_HOST_CPU = "x86"
- else: contains(GN_V8_HOST_CPU, arm64): GN_V8_HOST_CPU = "arm"
- else: contains(GN_V8_HOST_CPU, mips64): GN_V8_HOST_CPU = "mips"
-}
-
GN_CONTENTS = \
-" current_cpu = \"$$GN_V8_HOST_CPU\" " \
-" v8_current_cpu = \"$$GN_CPU\" " \
-" } " \
-"}" \
"gcc_toolchain(\"target\") {" \
" cc = \"$$which($$QMAKE_CC)\" " \
" cxx = \"$$which($$QMAKE_CXX)\" " \
diff --git a/tools/qmake/mkspecs/features/configure.prf b/tools/qmake/mkspecs/features/configure.prf
index c61cf7ebe..260e0f6d5 100644
--- a/tools/qmake/mkspecs/features/configure.prf
+++ b/tools/qmake/mkspecs/features/configure.prf
@@ -117,6 +117,10 @@ defineTest(runConfigure) {
cache(WEBENGINE_CONFIG, add, $$list($$WEBENGINE_CONFIG))
export(WEBENGINE_CONFIG)
}
+ # Set a global WEBENGINE_ARCH for the target architecture we can also read from option(host_build)
+ WEBENGINE_ARCH = $$QT_ARCH
+ cache(WEBENGINE_ARCH)
+ export(WEBENGINE_ARCH)
}
unix:!darwin {