Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Side by Side Diff: third_party/libwebp/BUILD.gn

Issue 2651883004: libwebp-0.6.0-rc1 (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/libwebp/README.chromium » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 import("//build/config/sanitizers/sanitizers.gni") 6 import("//build/config/sanitizers/sanitizers.gni")
7 7
8 config("libwebp_config") { 8 config("libwebp_config") {
9 include_dirs = [ "." ] 9 include_dirs = [ "." ]
10 } 10 }
11 11
12 set_opt_level = 12 set_opt_level =
13 !is_debug && is_posix && (current_cpu == "arm" || current_cpu == "arm64") 13 !is_debug && is_posix && (current_cpu == "arm" || current_cpu == "arm64")
14 14
15 use_dsp_neon = 15 use_dsp_neon =
16 current_cpu == "arm64" || (current_cpu == "arm" && arm_version >= 7 && 16 current_cpu == "arm64" || (current_cpu == "arm" && arm_version >= 7 &&
17 (arm_use_neon || arm_optionally_use_neon)) 17 (arm_use_neon || arm_optionally_use_neon))
18 18
19 static_library("libwebp_dec") { 19 static_library("libwebp_dec") {
20 sources = [ 20 sources = [
21 "dec/alpha.c", 21 "dec/alpha_dec.c",
22 "dec/buffer.c", 22 "dec/buffer_dec.c",
23 "dec/frame.c", 23 "dec/frame_dec.c",
24 "dec/idec.c", 24 "dec/idec_dec.c",
25 "dec/io.c", 25 "dec/io_dec.c",
26 "dec/quant.c", 26 "dec/quant_dec.c",
27 "dec/tree.c", 27 "dec/tree_dec.c",
28 "dec/vp8.c", 28 "dec/vp8_dec.c",
29 "dec/vp8l.c", 29 "dec/vp8l_dec.c",
30 "dec/webp.c", 30 "dec/webp_dec.c",
31 ] 31 ]
32 32
33 configs -= [ "//build/config/compiler:chromium_code" ] 33 configs -= [ "//build/config/compiler:chromium_code" ]
34 configs += [ "//build/config/compiler:no_chromium_code" ] 34 configs += [ "//build/config/compiler:no_chromium_code" ]
35 if (set_opt_level) { 35 if (set_opt_level) {
36 configs -= [ "//build/config/compiler:default_optimization" ] 36 configs -= [ "//build/config/compiler:default_optimization" ]
37 configs += [ "//build/config/compiler:optimize_max" ] 37 configs += [ "//build/config/compiler:optimize_max" ]
38 } 38 }
39 39
40 deps = [ 40 deps = [
(...skipping 30 matching lines...) Expand all
71 "dsp/cpu.c", 71 "dsp/cpu.c",
72 "dsp/dec.c", 72 "dsp/dec.c",
73 "dsp/dec_clip_tables.c", 73 "dsp/dec_clip_tables.c",
74 "dsp/dec_mips32.c", 74 "dsp/dec_mips32.c",
75 "dsp/dec_mips_dsp_r2.c", 75 "dsp/dec_mips_dsp_r2.c",
76 "dsp/dec_msa.c", 76 "dsp/dec_msa.c",
77 "dsp/enc.c", 77 "dsp/enc.c",
78 "dsp/enc_avx2.c", 78 "dsp/enc_avx2.c",
79 "dsp/enc_mips32.c", 79 "dsp/enc_mips32.c",
80 "dsp/enc_mips_dsp_r2.c", 80 "dsp/enc_mips_dsp_r2.c",
81 "dsp/enc_msa.c",
81 "dsp/filters.c", 82 "dsp/filters.c",
82 "dsp/filters_mips_dsp_r2.c", 83 "dsp/filters_mips_dsp_r2.c",
84 "dsp/filters_msa.c",
83 "dsp/lossless.c", 85 "dsp/lossless.c",
84 "dsp/lossless_enc.c", 86 "dsp/lossless_enc.c",
85 "dsp/lossless_enc_mips32.c", 87 "dsp/lossless_enc_mips32.c",
86 "dsp/lossless_enc_mips_dsp_r2.c", 88 "dsp/lossless_enc_mips_dsp_r2.c",
89 "dsp/lossless_enc_msa.c",
87 "dsp/lossless_mips_dsp_r2.c", 90 "dsp/lossless_mips_dsp_r2.c",
91 "dsp/lossless_msa.c",
88 "dsp/rescaler.c", 92 "dsp/rescaler.c",
89 "dsp/rescaler_mips32.c", 93 "dsp/rescaler_mips32.c",
90 "dsp/rescaler_mips_dsp_r2.c", 94 "dsp/rescaler_mips_dsp_r2.c",
95 "dsp/rescaler_msa.c",
91 "dsp/upsampling.c", 96 "dsp/upsampling.c",
92 "dsp/upsampling_mips_dsp_r2.c", 97 "dsp/upsampling_mips_dsp_r2.c",
98 "dsp/upsampling_msa.c",
93 "dsp/yuv.c", 99 "dsp/yuv.c",
94 "dsp/yuv_mips32.c", 100 "dsp/yuv_mips32.c",
95 "dsp/yuv_mips_dsp_r2.c", 101 "dsp/yuv_mips_dsp_r2.c",
96 ] 102 ]
97 configs -= [ "//build/config/compiler:chromium_code" ] 103 configs -= [ "//build/config/compiler:chromium_code" ]
98 configs += [ "//build/config/compiler:no_chromium_code" ] 104 configs += [ "//build/config/compiler:no_chromium_code" ]
99 if (set_opt_level) { 105 if (set_opt_level) {
100 configs -= [ "//build/config/compiler:default_optimization" ] 106 configs -= [ "//build/config/compiler:default_optimization" ]
101 configs += [ "//build/config/compiler:optimize_max" ] 107 configs += [ "//build/config/compiler:optimize_max" ]
102 } 108 }
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 if ((current_cpu == "x86" || current_cpu == "x64") && 176 if ((current_cpu == "x86" || current_cpu == "x64") &&
171 (!is_win || is_clang)) { 177 (!is_win || is_clang)) {
172 cflags = [ "-msse2" ] 178 cflags = [ "-msse2" ]
173 } 179 }
174 } 180 }
175 } 181 }
176 182
177 if (use_dsp_neon) { 183 if (use_dsp_neon) {
178 static_library("libwebp_dsp_neon") { 184 static_library("libwebp_dsp_neon") {
179 sources = [ 185 sources = [
186 "dsp/alpha_processing_neon.c",
180 "dsp/dec_neon.c", 187 "dsp/dec_neon.c",
181 "dsp/enc_neon.c", 188 "dsp/enc_neon.c",
189 "dsp/filters_neon.c",
182 "dsp/lossless_enc_neon.c", 190 "dsp/lossless_enc_neon.c",
183 "dsp/lossless_neon.c", 191 "dsp/lossless_neon.c",
184 "dsp/rescaler_neon.c", 192 "dsp/rescaler_neon.c",
185 "dsp/upsampling_neon.c", 193 "dsp/upsampling_neon.c",
186 ] 194 ]
187 195
188 include_dirs = [ "." ] 196 include_dirs = [ "." ]
189 197
190 if (set_opt_level) { 198 if (set_opt_level) {
191 configs -= [ "//build/config/compiler:default_optimization" ] 199 configs -= [ "//build/config/compiler:default_optimization" ]
(...skipping 11 matching lines...) Expand all
203 211
204 if (is_android) { 212 if (is_android) {
205 configs -= [ "//build/config/android:default_cygprofile_instrumentation" ] 213 configs -= [ "//build/config/android:default_cygprofile_instrumentation" ]
206 configs += [ "//build/config/android:no_cygprofile_instrumentation" ] 214 configs += [ "//build/config/android:no_cygprofile_instrumentation" ]
207 } 215 }
208 } 216 }
209 } # use_dsp_neon 217 } # use_dsp_neon
210 218
211 static_library("libwebp_enc") { 219 static_library("libwebp_enc") {
212 sources = [ 220 sources = [
213 "enc/alpha.c", 221 "enc/alpha_enc.c",
214 "enc/analysis.c", 222 "enc/analysis_enc.c",
215 "enc/backward_references.c", 223 "enc/backward_references_enc.c",
216 "enc/config.c", 224 "enc/config_enc.c",
217 "enc/cost.c", 225 "enc/cost_enc.c",
218 "enc/delta_palettization.c", 226 "enc/delta_palettization_enc.c",
219 "enc/filter.c", 227 "enc/filter_enc.c",
220 "enc/frame.c", 228 "enc/frame_enc.c",
221 "enc/histogram.c", 229 "enc/histogram_enc.c",
222 "enc/iterator.c", 230 "enc/iterator_enc.c",
223 "enc/near_lossless.c", 231 "enc/near_lossless_enc.c",
224 "enc/picture.c", 232 "enc/picture_csp_enc.c",
225 "enc/picture_csp.c", 233 "enc/picture_enc.c",
226 "enc/picture_psnr.c", 234 "enc/picture_psnr_enc.c",
227 "enc/picture_rescale.c", 235 "enc/picture_rescale_enc.c",
228 "enc/picture_tools.c", 236 "enc/picture_tools_enc.c",
229 "enc/quant.c", 237 "enc/predictor_enc.c",
230 "enc/syntax.c", 238 "enc/quant_enc.c",
231 "enc/token.c", 239 "enc/syntax_enc.c",
232 "enc/tree.c", 240 "enc/token_enc.c",
233 "enc/vp8l.c", 241 "enc/tree_enc.c",
234 "enc/webpenc.c", 242 "enc/vp8l_enc.c",
243 "enc/webp_enc.c",
235 ] 244 ]
236 configs -= [ "//build/config/compiler:chromium_code" ] 245 configs -= [ "//build/config/compiler:chromium_code" ]
237 configs += [ "//build/config/compiler:no_chromium_code" ] 246 configs += [ "//build/config/compiler:no_chromium_code" ]
238 if (set_opt_level) { 247 if (set_opt_level) {
239 configs -= [ "//build/config/compiler:default_optimization" ] 248 configs -= [ "//build/config/compiler:default_optimization" ]
240 configs += [ "//build/config/compiler:optimize_max" ] 249 configs += [ "//build/config/compiler:optimize_max" ]
241 } 250 }
242 251
243 all_dependent_configs = [ ":libwebp_config" ] 252 all_dependent_configs = [ ":libwebp_config" ]
244 253
245 deps = [ 254 deps = [
246 ":libwebp_utils", 255 ":libwebp_utils",
247 ] 256 ]
248 } 257 }
249 258
250 config("libwebp_utils_warnings") { 259 config("libwebp_utils_warnings") {
251 if (is_clang) { 260 if (is_clang) {
252 # See https://code.google.com/p/webp/issues/detail?id=253. 261 # See https://code.google.com/p/webp/issues/detail?id=253.
253 cflags = [ "-Wno-incompatible-pointer-types" ] 262 cflags = [ "-Wno-incompatible-pointer-types" ]
254 } 263 }
255 } 264 }
256 265
257 static_library("libwebp_utils") { 266 static_library("libwebp_utils") {
258 sources = [ 267 sources = [
259 "utils/bit_reader.c", 268 "utils/bit_reader_utils.c",
260 "utils/bit_writer.c", 269 "utils/bit_writer_utils.c",
261 "utils/color_cache.c", 270 "utils/color_cache_utils.c",
262 "utils/filters.c", 271 "utils/filters_utils.c",
263 "utils/huffman.c", 272 "utils/huffman_encode_utils.c",
264 "utils/huffman_encode.c", 273 "utils/huffman_utils.c",
265 "utils/quant_levels.c", 274 "utils/quant_levels_dec_utils.c",
266 "utils/quant_levels_dec.c", 275 "utils/quant_levels_utils.c",
267 "utils/random.c", 276 "utils/random_utils.c",
268 "utils/rescaler.c", 277 "utils/rescaler_utils.c",
269 "utils/thread.c", 278 "utils/thread_utils.c",
270 "utils/utils.c", 279 "utils/utils.c",
271 ] 280 ]
272 configs -= [ "//build/config/compiler:chromium_code" ] 281 configs -= [ "//build/config/compiler:chromium_code" ]
273 configs += [ "//build/config/compiler:no_chromium_code" ] 282 configs += [ "//build/config/compiler:no_chromium_code" ]
274 if (set_opt_level) { 283 if (set_opt_level) {
275 configs -= [ "//build/config/compiler:default_optimization" ] 284 configs -= [ "//build/config/compiler:default_optimization" ]
276 configs += [ "//build/config/compiler:optimize_max" ] 285 configs += [ "//build/config/compiler:optimize_max" ]
277 } 286 }
278 287
279 all_dependent_configs = [ ":libwebp_config" ] 288 all_dependent_configs = [ ":libwebp_config" ]
280 289
281 public_configs = [ ":libwebp_utils_warnings" ] 290 public_configs = [ ":libwebp_utils_warnings" ]
282 } 291 }
283 292
284 group("libwebp") { 293 group("libwebp") {
285 deps = [ 294 deps = [
286 ":libwebp_dec", 295 ":libwebp_dec",
287 ":libwebp_demux", 296 ":libwebp_demux",
288 ":libwebp_dsp", 297 ":libwebp_dsp",
289 ":libwebp_enc", 298 ":libwebp_enc",
290 ":libwebp_utils", 299 ":libwebp_utils",
291 ] 300 ]
292 public_configs = [ ":libwebp_config" ] 301 public_configs = [ ":libwebp_config" ]
293 if (use_dsp_neon) { 302 if (use_dsp_neon) {
294 deps += [ ":libwebp_dsp_neon" ] 303 deps += [ ":libwebp_dsp_neon" ]
295 } 304 }
296 } 305 }
OLDNEW
« no previous file with comments | « no previous file | third_party/libwebp/README.chromium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698