Commit 59ec1878 authored by Allan Sandfeld Jensen's avatar Allan Sandfeld Jensen
Browse files

Set gn use_gold based on qmake's use_gold_linker


Avoids adding --use-ld=gold on the link command line when gold linker
has been deselected in Qt.

Change-Id: I2d34cd3043aa24dca1f5f1604c97d8beccb70093
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@qt.io>
Showing with 11 additions and 0 deletions
...@@ -11,6 +11,9 @@ GN_OS = $$gnOS() ...@@ -11,6 +11,9 @@ GN_OS = $$gnOS()
clang: GN_CLANG = true clang: GN_CLANG = true
else: GN_CLANG = false else: GN_CLANG = false
use_gold_linker: GN_USE_GOLD=true
else: GN_USE_GOLD=false
GN_V8_HOST_CPU = $$GN_HOST_CPU GN_V8_HOST_CPU = $$GN_HOST_CPU
contains(GN_TARGET_CPU, "arm")|contains(GN_TARGET_CPU, "mips")|contains(GN_TARGET_CPU, "x86") { 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. # The v8 snapshot need a host that matches bitwidth, so we build makesnapshot to 32-bit variants of host.
...@@ -33,6 +36,8 @@ GN_CONTENTS = \ ...@@ -33,6 +36,8 @@ GN_CONTENTS = \
" toolchain_args = { " \ " toolchain_args = { " \
" current_os = \"$$GN_OS\" " \ " current_os = \"$$GN_OS\" " \
" current_cpu = \"$$GN_HOST_CPU\" " \ " current_cpu = \"$$GN_HOST_CPU\" " \
" is_clang = $$GN_CLANG " \
" use_gold = $$GN_USE_GOLD " \
" } " \ " } " \
"}" \ "}" \
"gcc_toolchain(\"v8_snapshot\") {" \ "gcc_toolchain(\"v8_snapshot\") {" \
...@@ -45,6 +50,8 @@ GN_CONTENTS = \ ...@@ -45,6 +50,8 @@ GN_CONTENTS = \
" current_os = \"$$GN_OS\" " \ " current_os = \"$$GN_OS\" " \
" current_cpu = \"$$GN_V8_HOST_CPU\" " \ " current_cpu = \"$$GN_V8_HOST_CPU\" " \
" v8_current_cpu = \"$$GN_TARGET_CPU\" " \ " v8_current_cpu = \"$$GN_TARGET_CPU\" " \
" is_clang = $$GN_CLANG " \
" use_gold = $$GN_USE_GOLD " \
" } " \ " } " \
" } " " } "
......
...@@ -7,6 +7,9 @@ GN_OS = $$gnOS() ...@@ -7,6 +7,9 @@ GN_OS = $$gnOS()
clang: GN_CLANG = true clang: GN_CLANG = true
else: GN_CLANG = false else: GN_CLANG = false
use_gold_linker: GN_USE_GOLD=true
else: GN_USE_GOLD=false
GN_CONTENTS = \ GN_CONTENTS = \
"gcc_toolchain(\"target\") {" \ "gcc_toolchain(\"target\") {" \
" cc = \"$$which($$QMAKE_CC)\" " \ " cc = \"$$which($$QMAKE_CC)\" " \
...@@ -18,6 +21,7 @@ GN_CONTENTS = \ ...@@ -18,6 +21,7 @@ GN_CONTENTS = \
" current_os = \"$$GN_OS\" " \ " current_os = \"$$GN_OS\" " \
" current_cpu = \"$$GN_CPU\" " \ " current_cpu = \"$$GN_CPU\" " \
" is_clang = $$GN_CLANG " \ " is_clang = $$GN_CLANG " \
" use_gold = $$GN_USE_GOLD " \
" } " \ " } " \
"}" "}"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment