Re-enable LLVM LTO for ARM.

v8 is optimized for speed. Because GCC LTO merges flags at link time,
we disable LTO to prevent any -O2 flags from taking precedence over v8's
-Os flag. However, LLVM LTO does not work this way so we keep LTO enabled
under LLVM.

This fixes the ARM build in the cfi_vptr==1 configuration, which requires
LLVM LTO.

R=adamk@chromium.org
BUG=chromium:469376
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30455}
This commit is contained in:
pcc 2015-08-28 16:05:31 -07:00 committed by Commit bot
parent 6773e2961d
commit fef4fab6bb

View File

@ -277,10 +277,12 @@
}],
],
}],
# Disable LTO for v8
# v8 is optimized for speed, which takes precedence over
# size optimization in LTO.
['use_lto==1', {
# Disable GCC LTO for v8
# v8 is optimized for speed. Because GCC LTO merges flags at link
# time, we disable LTO to prevent any -O2 flags from taking
# precedence over v8's -Os flag. However, LLVM LTO does not work
# this way so we keep LTO enabled under LLVM.
['clang==0 and use_lto==1', {
'cflags!': [
'-flto',
'-ffat-lto-objects',