From 0944419447b6578abca575e4c25f6e0176f7d991 Mon Sep 17 00:00:00 2001 From: "yangguo@chromium.org" Date: Mon, 25 Aug 2014 07:32:29 +0000 Subject: [PATCH] Add LTO support for Android Chromium. This is to add support for a Link-Time Optimizations experiment in Android Chromium. As it is disabled by default, it won't change anything for most configurations. R=ulan@chromium.org Review URL: https://codereview.chromium.org/497713002 Patch from Fabrice de Gans . git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23336 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- build/toolchain.gypi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/build/toolchain.gypi b/build/toolchain.gypi index 45c1f9d..eddc329 100644 --- a/build/toolchain.gypi +++ b/build/toolchain.gypi @@ -91,6 +91,9 @@ # Allow to suppress the array bounds warning (default is no suppression). 'wno_array_bounds%': '', + # Link-Time Optimizations + 'use_lto%': 0, + 'variables': { # This is set when building the Android WebView inside the Android build # system, using the 'android' gyp backend. @@ -241,6 +244,15 @@ }], ], }], + # Disable LTO for v8 + # v8 is optimized for speed, which takes precedence over + # size optimization in LTO. + ['use_lto==1', { + 'cflags!': [ + '-flto', + '-ffat-lto-objects', + ], + }], ], }], # _toolset=="target" ], -- 2.7.4