Commit fca6ff48 authored by pcc's avatar pcc Committed by Commit bot

Make Android-specific LTO disablements have effect only on Android.

Also add a TODO requested by Nico.

BUG=453195
R=thakis@chromium.org
CC=fdegans@chromium.org

Review URL: https://codereview.chromium.org/880403005

Cr-Commit-Position: refs/heads/master@{#313803}
parent 10bdf01c
......@@ -8,7 +8,7 @@
'target_conditions': [
['_toolset=="target"', {
'conditions': [
['use_lto==1 or use_lto_o2==1', {
['OS=="android" and (use_lto==1 or use_lto_o2==1)', {
'cflags!': [
'-flto',
'-ffat-lto-objects',
......
......@@ -22,13 +22,13 @@
# LTO merges all optimization options at link-time. -O2 takes
# precedence over -Os. Avoid using LTO simultaneously
# on -Os and -O2 parts for that reason.
['use_lto==1', {
['OS=="android" and use_lto==1', {
'cflags!': [
'-flto',
'-ffat-lto-objects',
],
}],
['use_lto_o2==1', {
['OS=="android" and use_lto_o2==1', {
'cflags': [
'-flto',
'-ffat-lto-objects',
......
......@@ -2985,7 +2985,8 @@
}],
['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.
# 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'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment