Index: build/common.gypi |
diff --git a/build/common.gypi b/build/common.gypi |
index 644b7ad1cc0090757e1a0f30503c0f8e1c185238..64a274b45551d0582f84d7f42ab83faceeb1f342 100644 |
--- a/build/common.gypi |
+++ b/build/common.gypi |
@@ -2983,6 +2983,11 @@ |
['v8_use_external_startup_data==1', { |
'defines': ['V8_USE_EXTERNAL_STARTUP_DATA'], |
}], |
+ ['use_lto==1 and (target_arch=="ia32" or target_arch=="x64")', { |
+ # Required for third_party/zlib/crc_folding.c and various other code |
+ # that uses SSE. |
+ 'ldflags': ['-Wl,-plugin-opt,mcpu=corei7-avx'], |
+ }], |
], # conditions for 'target_defaults' |
'target_conditions': [ |
['<(use_libpci)==1', { |
@@ -5781,13 +5786,23 @@ |
['_toolset=="target"', { |
'cflags': [ |
'-flto', |
+ ], |
+ }], |
+ ], |
+ }, |
+ }], |
+ ['use_lto==1 and clang==0', { |
+ 'target_defaults': { |
+ 'target_conditions': [ |
+ ['_toolset=="target"', { |
+ 'cflags': [ |
'-ffat-lto-objects', |
], |
}], |
], |
}, |
}], |
- ['use_lto==1 or use_lto_o2==1', { |
+ ['(use_lto==1 or use_lto_o2==1) and clang==0', { |
'target_defaults': { |
'target_conditions': [ |
['_toolset=="target"', { |
@@ -5798,6 +5813,17 @@ |
], |
}, |
}], |
+ ['(use_lto==1 or use_lto_o2==1) and clang==1', { |
+ 'target_defaults': { |
+ 'target_conditions': [ |
+ ['_toolset=="target"', { |
+ 'ldflags': [ |
+ '-flto', |
+ ], |
+ }], |
+ ], |
+ }, |
+ }], |
], |
'xcode_settings': { |
# DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! |