Revert 121165 - Revert 121068 - linux: add a use_gold flag that defaults to on
[This CL was backed out speculatively due to failures on the cros trunk bot. But this CL was not the cause of that problem, so I'm un-doing the revert.] Currently, gyp attempts to autodetect whether the linker supports the --icf flag. It's more predictable to just require the caller to specify whether they're using gold. As a first demonstration of this, drop LINKER_USES_ICF code in the Chrome build. (I'll follow up with a gyp patch to remove the LINKER_USES_ICF stuff in gyp.) Review URL: https://chromiumcodereview.appspot.com/9368015 TBR=evan@chromium.org Review URL: https://chromiumcodereview.appspot.com/9372012 git-svn-id: http://src.chromium.org/svn/trunk/src/build@121175 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
Родитель
0596e8b288
Коммит
28154f0194
48
common.gypi
48
common.gypi
|
@ -387,12 +387,16 @@
|
|||
'enable_plugin_installation%': 1,
|
||||
}],
|
||||
|
||||
# Set to 0 to not use third_party/gold as the linker.
|
||||
# linux_use_gold_binary: whether to use the binary checked into
|
||||
# third_party/gold.
|
||||
# linux_use_gold_flags: whether to use build flags that rely on gold.
|
||||
# On by default for x64 Linux.
|
||||
['host_arch=="x64"', {
|
||||
'linux_use_gold_binary%': 1,
|
||||
'linux_use_gold_flags%': 1,
|
||||
}, {
|
||||
'linux_use_gold_binary%': 0,
|
||||
'linux_use_gold_flags%': 0,
|
||||
}],
|
||||
|
||||
# Enable canvas_skia_skia.cc incrementally on different platforms.
|
||||
|
@ -460,6 +464,7 @@
|
|||
'enable_web_intents_tag%': '<(enable_web_intents_tag)',
|
||||
'enable_plugin_installation%': '<(enable_plugin_installation)',
|
||||
'linux_use_gold_binary%': '<(linux_use_gold_binary)',
|
||||
'linux_use_gold_flags%': '<(linux_use_gold_flags)',
|
||||
'use_canvas_skia_skia%': '<(use_canvas_skia_skia)',
|
||||
# Whether to build for Wayland display server
|
||||
'use_wayland%': 0,
|
||||
|
@ -631,6 +636,8 @@
|
|||
# whether warnings are treated as errors.
|
||||
'chromium_code%': 0,
|
||||
|
||||
'release_valgrind_build%': 0,
|
||||
|
||||
# TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
|
||||
'enable_wexit_time_destructors%': 0,
|
||||
|
||||
|
@ -1002,7 +1009,8 @@
|
|||
|
||||
'release_extra_cflags%': '',
|
||||
'debug_extra_cflags%': '',
|
||||
'release_valgrind_build%': 0,
|
||||
|
||||
'release_valgrind_build%': '<(release_valgrind_build)',
|
||||
|
||||
# the non-qualified versions are widely assumed to be *nix-only
|
||||
'win_release_extra_cflags%': '',
|
||||
|
@ -1725,23 +1733,7 @@
|
|||
'-g',
|
||||
],
|
||||
}],
|
||||
# At gyp time, we test the linker for ICF support; this flag
|
||||
# is then provided to us by gyp. (Currently only gold supports
|
||||
# an --icf flag.)
|
||||
# There seems to be a conflict of --icf and -pie in gold which
|
||||
# can generate crashy binaries. As a security measure, -pie
|
||||
# takes precendence for now.
|
||||
['LINKER_SUPPORTS_ICF==1 and release_valgrind_build==0', {
|
||||
'target_conditions': [
|
||||
['_toolset=="target"', {
|
||||
'ldflags': [
|
||||
#'-Wl,--icf=safe',
|
||||
'-Wl,--icf=none',
|
||||
]
|
||||
}]
|
||||
]
|
||||
}],
|
||||
]
|
||||
],
|
||||
},
|
||||
},
|
||||
'variants': {
|
||||
|
@ -2007,6 +1999,24 @@
|
|||
'defines': ['KEEP_SHADOW_STACKS'],
|
||||
'cflags': ['-finstrument-functions'],
|
||||
}],
|
||||
['linux_use_gold_flags==1', {
|
||||
'conditions': [
|
||||
['release_valgrind_build==0', {
|
||||
'target_conditions': [
|
||||
['_toolset=="target"', {
|
||||
'ldflags': [
|
||||
# There seems to be a conflict of --icf and -pie
|
||||
# in gold which can generate crashy binaries. As
|
||||
# a security measure, -pie takes precendence for
|
||||
# now.
|
||||
#'-Wl,--icf=safe',
|
||||
'-Wl,--icf=none',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
['linux_use_gold_binary==1', {
|
||||
'variables': {
|
||||
# We pass the path to gold to the compiler. gyp leaves
|
||||
|
|
Загрузка…
Ссылка в новой задаче