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

Unified Diff: build/common.gypi

Issue 1024203004: Port LTO-related flags to more platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add link to LLVM bug Created 5 years, 9 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 e84856a9512bfbb7c2ce67d9b649f5951c833cde..01bae218bd6796a60eaa67257c191fced9448a7a 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -3005,12 +3005,6 @@
['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. TODO(pcc): Remove this once we properly support
- # subtarget specific code generation in LLVM.
- 'ldflags': ['-Wl,-plugin-opt,mcpu=corei7-avx'],
- }],
], # conditions for 'target_defaults'
'target_conditions': [
['<(use_libpci)==1', {
@@ -5941,6 +5935,41 @@
],
},
}],
+ ['use_lto==1 and clang==1 and (target_arch=="ia32" or target_arch=="x64")', {
+ 'target_defaults': {
+ 'target_conditions': [
+ # Required for third_party/zlib/crc_folding.c and various other code
+ # that uses SSE. TODO(pcc): Remove this once we properly support
+ # subtarget specific code generation in LLVM.
+ ['_toolset=="target"', {
+ 'ldflags': [
+ '-Wl,-plugin-opt,mcpu=corei7-avx',
+ ],
+ }],
+ ['_toolset=="target" and _type!="static_library"', {
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ '-Wl,-mcpu,corei7-avx',
+ ],
+ },
+ }],
+ ],
+ },
+ }],
+ ['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': [
« 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