diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-03-15 13:26:24 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-03-19 11:55:08 +0000 |
commit | 4e6921c6c38b0b8786a5209949791742a0e06b94 (patch) | |
tree | 6111563b4ac3200a3d08abeb0f4bb7af6bef7274 /src | |
parent | 8aa508d2e5d39fef9dacb1494ca6fdc94d50efaa (diff) |
Build v8snapshot with host of matching bitwidth
Use the separate GN toolchain for v8snapshot to match bitwidth of host
and target for that tool.
Task-number: QTBUG-59504
Change-Id: Ic01675a4d4daf4be0327c516195fe87ac16720f2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/buildtools/configure_host.pro | 14 | ||||
-rw-r--r-- | src/buildtools/configure_target.pro | 14 |
2 files changed, 16 insertions, 12 deletions
diff --git a/src/buildtools/configure_host.pro b/src/buildtools/configure_host.pro index 217fad775..d8d731df7 100644 --- a/src/buildtools/configure_host.pro +++ b/src/buildtools/configure_host.pro @@ -4,8 +4,7 @@ TEMPLATE = aux # Pick up the host toolchain option(host_build) -GN_TARGET_CPU = $$gnArch($$QT_ARCH) -GN_CPU = $$gnArch($$QMAKE_HOST.arch) +GN_HOST_CPU = $$gnArch($$QMAKE_HOST.arch) GN_OS = $$gnOS() clang: GN_CLANG = true @@ -24,7 +23,7 @@ GN_CONTENTS = \ " nm = \"$$which(nm)\" " \ " toolchain_args = { " \ " current_os = \"$$GN_OS\" " \ -" current_cpu = \"$$GN_CPU\" " \ +" current_cpu = \"$$GN_HOST_CPU\" " \ " } " \ "}" \ "gcc_toolchain(\"v8_snapshot\") {" \ @@ -34,13 +33,8 @@ GN_CONTENTS = \ " ar = \"$$which(ar)\" " \ " nm = \"$$which(nm)\" " \ " toolchain_args = { " \ -" current_os = \"$$GN_OS\" " \ -" current_cpu = \"$$GN_CPU\" " \ -" v8_current_cpu = \"$$GN_TARGET_CPU\" " \ -" } " \ -"}" - - +" current_os = \"$$GN_OS\" " +# The v8_snapshot toolchain is finished by configure_target.pro GN_FILE = $$OUT_PWD/../toolchain/BUILD.gn !build_pass { diff --git a/src/buildtools/configure_target.pro b/src/buildtools/configure_target.pro index ab30570e0..ec8e9ccfa 100644 --- a/src/buildtools/configure_target.pro +++ b/src/buildtools/configure_target.pro @@ -7,9 +7,19 @@ GN_OS = $$gnOS() clang: GN_CLANG = true else: GN_CLANG = false -# We always use the gcc_toolchain, because clang_toolchain is just -# a broken wrapper around it for Google's custom clang binaries. +GN_V8_HOST_CPU = $$gnArch($$QMAKE_HOST.arch) +contains(GN_CPU, "arm")|contains(GN_CPU, "mips") { + # 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)\" " \ |