Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1041)

Unified Diff: build/common.gypi

Issue 884923002: Pass correct flags for use_lto==1 with Clang. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove + Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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!
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698