diff options
author | cjhopman@chromium.org <cjhopman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-29 00:20:58 +0000 |
---|---|---|
committer | cjhopman@chromium.org <cjhopman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-29 00:20:58 +0000 |
commit | 0ac572b9b338a7e80189efdfbb7b64fe96147dea (patch) | |
tree | 4bde50b10fcf863bce73fb0428c0d3536b309c73 /skia/BUILD.gn | |
parent | 6111004802718e6566262f82699d0ab0ed4e53f3 (diff) | |
download | chromium_src-0ac572b9b338a7e80189efdfbb7b64fe96147dea.zip chromium_src-0ac572b9b338a7e80189efdfbb7b64fe96147dea.tar.gz chromium_src-0ac572b9b338a7e80189efdfbb7b64fe96147dea.tar.bz2 |
Fix optional neon support
On Android, we detect neon support at runtime and switch implementations
based on that. This requires that some parts of skia are compiled with
-mfpu=neon.
To support this, the -mfpu flag is moved out of the 'compiler' config
and into its own config. A target can then remove this config and supply
its own -mfpu flag (without having to duplicate all the other stuff in
the 'compiler' config).
BUG=359249
Review URL: https://codereview.chromium.org/371853007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286038 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/BUILD.gn')
-rw-r--r-- | skia/BUILD.gn | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/skia/BUILD.gn b/skia/BUILD.gn index 1a043ce..2b520e4 100644 --- a/skia/BUILD.gn +++ b/skia/BUILD.gn @@ -180,6 +180,15 @@ config("skia_library_config") { "SK_USE_DISCARDABLE_SCALEDIMAGECACHE", ] + if (cpu_arch == "arm") { + if (arm_use_neon) { + defines += [ "__ARM_HAVE_NEON" ] + } + if (arm_optionally_use_neon) { + defines += [ "__ARM_HAVE_OPTIONAL_NEON_SUPPORT" ] + } + } + # Settings for text blitting, chosen to approximate the system browser. if (is_linux) { defines += [ @@ -626,20 +635,18 @@ source_set("skia_opts") { # Root build config sets -mfpu=$arm_fpu, which we expect to be neon # when running this. - assert(arm_fpu == "neon") + if (!arm_use_neon) { + configs -= [ "//build/config/compiler:compiler_arm_fpu" ] + cflags += [ + "-mfpu=neon" + ] + } #ldflags = [ # "-march=armv7-a", # "-Wl,--fix-cortex-a8", #] } - - if (arm_use_neon) { - defines += [ "__ARM_HAVE_NEON" ] - } - if (arm_optionally_use_neon) { - defines += [ "__ARM_HAVE_OPTIONAL_NEON_SUPPORT" ] - } } # Non-Neon ARM code. |