| Index: build/common.gypi
|
| diff --git a/build/common.gypi b/build/common.gypi
|
| index 03416541de98945ef60e7343a413a55ae7ee5df7..0e88c8b8694bad1e4c754f8a2784d1303c6ffb36 100644
|
| --- a/build/common.gypi
|
| +++ b/build/common.gypi
|
| @@ -6149,6 +6149,11 @@
|
| ['_toolset=="target"', {
|
| 'ldflags': [
|
| '-Wl,--plugin-opt,O1',
|
| + # Allows the linker to apply ICF to the LTO object file. Also, when
|
| + # targeting ARM, wWithout this flag, LTO produces a .text section
|
| + # that is larger than the maximum call displacement, preventing the
|
| + # linker from relocating calls (http://llvm.org/PR22999).
|
| + '-Wl,--plugin-opt,-function-sections',
|
| ],
|
| }],
|
| ['_toolset=="target" and _type!="static_library"', {
|
| @@ -6168,20 +6173,6 @@
|
| },
|
| },
|
| }],
|
| - ['use_lto==1 and clang==1 and target_arch=="arm"', {
|
| - 'target_defaults': {
|
| - 'target_conditions': [
|
| - ['_toolset=="target"', {
|
| - # Without this flag, LTO produces a .text section that is larger
|
| - # than the maximum call displacement, preventing the linker from
|
| - # relocating calls (http://llvm.org/PR22999).
|
| - 'ldflags': [
|
| - '-Wl,-plugin-opt,-function-sections',
|
| - ],
|
| - }],
|
| - ],
|
| - },
|
| - }],
|
| ['(use_lto==1 or use_lto_o2==1) and clang==0', {
|
| 'target_defaults': {
|
| 'target_conditions': [
|
| @@ -6327,6 +6318,24 @@
|
| ],
|
| },
|
| }],
|
| + # TODO(pcc): Make these flags work correctly with CFI.
|
| + ['use_lto!=0 and cfi_vptr==0', {
|
| + 'target_defaults': {
|
| + 'target_conditions': [
|
| + ['_toolset=="target"', {
|
| + 'cflags': [
|
| + '-fwhole-program-vtables',
|
| + # TODO(pcc): Remove this flag once the upstream interface change
|
| + # (http://reviews.llvm.org/D18635) lands.
|
| + '-fwhole-program-vtables-blacklist=<(cfi_blacklist)',
|
| + ],
|
| + 'ldflags': [
|
| + '-fwhole-program-vtables',
|
| + ],
|
| + }],
|
| + ],
|
| + },
|
| + }],
|
| ],
|
| 'xcode_settings': {
|
| # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
|
|
|