Commit c2a78ebf authored by fbarchard@google.com's avatar fbarchard@google.com

Add LTO support for Android Chromium.

BUG=354
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=tpsiaki@google.com

Review URL: https://webrtc-codereview.appspot.com/21329004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1061 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent ee43c95c
Name: libyuv Name: libyuv
URL: http://code.google.com/p/libyuv/ URL: http://code.google.com/p/libyuv/
Version: 1059 Version: 1061
License: BSD License: BSD
License File: LICENSE License File: LICENSE
......
...@@ -11,6 +11,6 @@ ...@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT #ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_ #define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 1059 #define LIBYUV_VERSION 1061
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
...@@ -19,9 +19,11 @@ ...@@ -19,9 +19,11 @@
'variables': { 'variables': {
'use_system_libjpeg%': 0, 'use_system_libjpeg%': 0,
'libyuv_disable_jpeg%': 0, 'libyuv_disable_jpeg%': 0,
# Link-Time Optimizations.
'use_lto%': 0,
'build_neon': 0, 'build_neon': 0,
'conditions': [ 'conditions': [
[ '(target_arch == "armv7" or target_arch == "armv7s" or \ ['(target_arch == "armv7" or target_arch == "armv7s" or \
(target_arch == "arm" and arm_version >= 7) or target_arch == "arm64")\ (target_arch == "arm" and arm_version >= 7) or target_arch == "arm64")\
and target_subarch != 64 and (arm_neon == 1 or arm_neon_optional == 1)', and target_subarch != 64 and (arm_neon == 1 or arm_neon_optional == 1)',
{ {
...@@ -30,7 +32,7 @@ ...@@ -30,7 +32,7 @@
], ],
}, },
'conditions': [ 'conditions': [
[ 'build_neon != 0', { ['build_neon != 0', {
'targets': [ 'targets': [
# The NEON-specific components. # The NEON-specific components.
{ {
...@@ -70,6 +72,15 @@ ...@@ -70,6 +72,15 @@
'source/scale_neon.cc', 'source/scale_neon.cc',
'source/scale_neon64.cc', 'source/scale_neon64.cc',
], ],
'conditions': [
# Disable LTO in libyuv_neon target due to compiler bug
['use_lto == 1', {
'cflags!': [
'-flto',
'-ffat-lto-objects',
],
}],
],
}, },
], ],
}], }],
...@@ -82,12 +93,12 @@ ...@@ -82,12 +93,12 @@
# Allows libyuv.a redistributable library without external dependencies. # Allows libyuv.a redistributable library without external dependencies.
'standalone_static_library': 1, 'standalone_static_library': 1,
'conditions': [ 'conditions': [
[ 'OS == "ios" and target_subarch == 64', { ['OS == "ios" and target_subarch == 64', {
'defines': [ 'defines': [
'LIBYUV_DISABLE_NEON' 'LIBYUV_DISABLE_NEON'
], ],
}], }],
[ 'OS != "ios" and libyuv_disable_jpeg != 1', { ['OS != "ios" and libyuv_disable_jpeg != 1', {
'defines': [ 'defines': [
'HAVE_JPEG' 'HAVE_JPEG'
], ],
...@@ -111,12 +122,12 @@ ...@@ -111,12 +122,12 @@
}], }],
], ],
}], }],
[ 'build_neon != 0', { ['build_neon != 0', {
'dependencies': [ 'dependencies': [
'libyuv_neon', 'libyuv_neon',
], ],
'conditions': [ 'conditions': [
#TODO LIBYUV_NEON is temporary disabled. When all arm64 port has # TODO LIBYUV_NEON is temporary disabled. When all arm64 port has
# been done, enable it. # been done, enable it.
['target_arch !="arm64"', { ['target_arch !="arm64"', {
'defines': [ 'defines': [
......
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