Reviewers: Michael Achenbach (OOO),

Description:
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.

[email protected]
BUG=chromium:469376

Please review this at https://codereview.chromium.org/1295673002/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+6, -4 lines):
  M build/toolchain.gypi


Index: build/toolchain.gypi
diff --git a/build/toolchain.gypi b/build/toolchain.gypi
index a8a3b56ec22a2b761cfff51f95dc393b38000649..2163171d7e55a01f6d79beaa489a87f7f0175a58 100644
--- a/build/toolchain.gypi
+++ b/build/toolchain.gypi
@@ -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',


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to