OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/arm.gni") | 5 import("//build/config/arm.gni") |
6 | 6 |
7 config("libwebp_config") { | 7 config("libwebp_config") { |
8 include_dirs = [ "." ] | 8 include_dirs = [ "." ] |
9 } | 9 } |
10 | 10 |
11 use_dsp_neon = | 11 use_dsp_neon = |
12 cpu_arch == "arm64" || (cpu_arch == "arm" && arm_version >= 7 && | 12 current_cpu == "arm64" || (current_cpu == "arm" && arm_version >= 7 && |
13 (arm_use_neon || arm_optionally_use_neon)) | 13 (arm_use_neon || arm_optionally_use_neon)) |
14 | 14 |
15 source_set("libwebp_dec") { | 15 source_set("libwebp_dec") { |
16 sources = [ | 16 sources = [ |
17 "dec/alpha.c", | 17 "dec/alpha.c", |
18 "dec/buffer.c", | 18 "dec/buffer.c", |
19 "dec/frame.c", | 19 "dec/frame.c", |
20 "dec/idec.c", | 20 "dec/idec.c", |
21 "dec/io.c", | 21 "dec/io.c", |
22 "dec/quant.c", | 22 "dec/quant.c", |
23 "dec/tree.c", | 23 "dec/tree.c", |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 source_set("libwebp_dsp_neon") { | 95 source_set("libwebp_dsp_neon") { |
96 sources = [ | 96 sources = [ |
97 "dsp/dec_neon.c", | 97 "dsp/dec_neon.c", |
98 "dsp/enc_neon.c", | 98 "dsp/enc_neon.c", |
99 "dsp/lossless_neon.c", | 99 "dsp/lossless_neon.c", |
100 "dsp/upsampling_neon.c", | 100 "dsp/upsampling_neon.c", |
101 ] | 101 ] |
102 | 102 |
103 include_dirs = [ "." ] | 103 include_dirs = [ "." ] |
104 | 104 |
105 if (cpu_arch == "arm") { | 105 if (current_cpu == "arm") { |
106 # behavior similar to *.c.neon in an Android.mk | 106 # behavior similar to *.c.neon in an Android.mk |
107 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] | 107 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] |
108 cflags = [ "-mfpu=neon" ] | 108 cflags = [ "-mfpu=neon" ] |
109 } else if (cpu_arch == "arm64") { | 109 } else if (current_cpu == "arm64") { |
110 # avoid an ICE with gcc-4.9: b/15574841 | 110 # avoid an ICE with gcc-4.9: b/15574841 |
111 cflags = [ "-frename-registers" ] | 111 cflags = [ "-frename-registers" ] |
112 } | 112 } |
113 | 113 |
114 # TODO(GYP): | 114 # TODO(GYP): |
115 # ['order_profiling != 0', { | 115 # ['order_profiling != 0', { |
116 # 'target_conditions' : [ | 116 # 'target_conditions' : [ |
117 # ['_toolset=="target"', { | 117 # ['_toolset=="target"', { |
118 # 'cflags!': [ '-finstrument-functions' ], | 118 # 'cflags!': [ '-finstrument-functions' ], |
119 # }], | 119 # }], |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 ":libwebp_demux", | 180 ":libwebp_demux", |
181 ":libwebp_dsp", | 181 ":libwebp_dsp", |
182 ":libwebp_enc", | 182 ":libwebp_enc", |
183 ":libwebp_utils", | 183 ":libwebp_utils", |
184 ] | 184 ] |
185 public_configs = [ ":libwebp_config" ] | 185 public_configs = [ ":libwebp_config" ] |
186 if (use_dsp_neon) { | 186 if (use_dsp_neon) { |
187 deps += [ ":libwebp_dsp_neon" ] | 187 deps += [ ":libwebp_dsp_neon" ] |
188 } | 188 } |
189 } | 189 } |
OLD | NEW |