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

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

Issue 2852003003: Fix missing headers in libwebp (Closed)
Patch Set: fix ios another way Created 3 years, 7 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 | « components/image_fetcher/ios/BUILD.gn ('k') | no next file » | 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 source_set("libwebp_headers") {
20 sources = [
21 "webp/decode.h",
22 "webp/demux.h",
23 "webp/encode.h",
24 "webp/format_constants.h",
25 "webp/mux_types.h",
26 "webp/types.h",
27 ]
28 }
29
19 static_library("libwebp_dec") { 30 static_library("libwebp_dec") {
20 sources = [ 31 sources = [
21 "dec/alpha_dec.c", 32 "dec/alpha_dec.c",
33 "dec/alphai_dec.h",
22 "dec/buffer_dec.c", 34 "dec/buffer_dec.c",
35 "dec/common_dec.h",
fbarchard1 2017/05/01 18:11:50 Historically I think we also kept a full source li
fbarchard1 2017/05/01 18:11:50 If you remove these from the source, a change to t
Nico 2017/05/01 18:20:47 No, this isn't for build dependency checking, that
wychen 2017/05/01 18:36:21 Before this change, if we have a CL only modifying
23 "dec/frame_dec.c", 36 "dec/frame_dec.c",
24 "dec/idec_dec.c", 37 "dec/idec_dec.c",
25 "dec/io_dec.c", 38 "dec/io_dec.c",
26 "dec/quant_dec.c", 39 "dec/quant_dec.c",
27 "dec/tree_dec.c", 40 "dec/tree_dec.c",
28 "dec/vp8_dec.c", 41 "dec/vp8_dec.c",
42 "dec/vp8_dec.h",
43 "dec/vp8i_dec.h",
29 "dec/vp8l_dec.c", 44 "dec/vp8l_dec.c",
45 "dec/vp8li_dec.h",
30 "dec/webp_dec.c", 46 "dec/webp_dec.c",
47 "dec/webpi_dec.h",
31 ] 48 ]
32 49
33 configs -= [ "//build/config/compiler:chromium_code" ] 50 configs -= [ "//build/config/compiler:chromium_code" ]
34 configs += [ "//build/config/compiler:no_chromium_code" ] 51 configs += [ "//build/config/compiler:no_chromium_code" ]
35 if (set_opt_level) { 52 if (set_opt_level) {
36 configs -= [ "//build/config/compiler:default_optimization" ] 53 configs -= [ "//build/config/compiler:default_optimization" ]
37 configs += [ "//build/config/compiler:optimize_max" ] 54 configs += [ "//build/config/compiler:optimize_max" ]
38 } 55 }
39 56
40 deps = [ 57 deps = [
41 ":libwebp_dsp", 58 ":libwebp_dsp",
59 ":libwebp_headers",
42 ":libwebp_utils", 60 ":libwebp_utils",
43 ] 61 ]
44 all_dependent_configs = [ ":libwebp_config" ] 62 all_dependent_configs = [ ":libwebp_config" ]
45 if (use_dsp_neon) { 63 if (use_dsp_neon) {
46 deps += [ ":libwebp_dsp_neon" ] 64 deps += [ ":libwebp_dsp_neon" ]
47 } 65 }
48 } 66 }
49 67
50 static_library("libwebp_demux") { 68 static_library("libwebp_demux") {
51 sources = [ 69 sources = [
52 "demux/demux.c", 70 "demux/demux.c",
53 ] 71 ]
54 all_dependent_configs = [ ":libwebp_config" ] 72 all_dependent_configs = [ ":libwebp_config" ]
55 configs -= [ "//build/config/compiler:chromium_code" ] 73 configs -= [ "//build/config/compiler:chromium_code" ]
56 configs += [ "//build/config/compiler:no_chromium_code" ] 74 configs += [ "//build/config/compiler:no_chromium_code" ]
57 deps = [ 75 deps = [
76 ":libwebp_headers",
58 ":libwebp_utils", 77 ":libwebp_utils",
59 ] 78 ]
60 } 79 }
61 80
62 static_library("libwebp_dsp") { 81 static_library("libwebp_dsp") {
63 sources = [ 82 sources = [
64 "dsp/alpha_processing.c", 83 "dsp/alpha_processing.c",
65 "dsp/alpha_processing_mips_dsp_r2.c", 84 "dsp/alpha_processing_mips_dsp_r2.c",
66 "dsp/argb.c", 85 "dsp/argb.c",
67 "dsp/argb_mips_dsp_r2.c", 86 "dsp/argb_mips_dsp_r2.c",
87 "dsp/common_sse2.h",
68 "dsp/cost.c", 88 "dsp/cost.c",
69 "dsp/cost_mips32.c", 89 "dsp/cost_mips32.c",
70 "dsp/cost_mips_dsp_r2.c", 90 "dsp/cost_mips_dsp_r2.c",
71 "dsp/cpu.c", 91 "dsp/cpu.c",
72 "dsp/dec.c", 92 "dsp/dec.c",
73 "dsp/dec_clip_tables.c", 93 "dsp/dec_clip_tables.c",
74 "dsp/dec_mips32.c", 94 "dsp/dec_mips32.c",
75 "dsp/dec_mips_dsp_r2.c", 95 "dsp/dec_mips_dsp_r2.c",
76 "dsp/dec_msa.c", 96 "dsp/dec_msa.c",
97 "dsp/dsp.h",
77 "dsp/enc.c", 98 "dsp/enc.c",
78 "dsp/enc_avx2.c", 99 "dsp/enc_avx2.c",
79 "dsp/enc_mips32.c", 100 "dsp/enc_mips32.c",
80 "dsp/enc_mips_dsp_r2.c", 101 "dsp/enc_mips_dsp_r2.c",
81 "dsp/enc_msa.c", 102 "dsp/enc_msa.c",
82 "dsp/filters.c", 103 "dsp/filters.c",
83 "dsp/filters_mips_dsp_r2.c", 104 "dsp/filters_mips_dsp_r2.c",
84 "dsp/filters_msa.c", 105 "dsp/filters_msa.c",
85 "dsp/lossless.c", 106 "dsp/lossless.c",
107 "dsp/lossless.h",
108 "dsp/lossless_common.h",
86 "dsp/lossless_enc.c", 109 "dsp/lossless_enc.c",
87 "dsp/lossless_enc_mips32.c", 110 "dsp/lossless_enc_mips32.c",
88 "dsp/lossless_enc_mips_dsp_r2.c", 111 "dsp/lossless_enc_mips_dsp_r2.c",
89 "dsp/lossless_enc_msa.c", 112 "dsp/lossless_enc_msa.c",
90 "dsp/lossless_mips_dsp_r2.c", 113 "dsp/lossless_mips_dsp_r2.c",
91 "dsp/lossless_msa.c", 114 "dsp/lossless_msa.c",
115 "dsp/neon.h",
92 "dsp/rescaler.c", 116 "dsp/rescaler.c",
93 "dsp/rescaler_mips32.c", 117 "dsp/rescaler_mips32.c",
94 "dsp/rescaler_mips_dsp_r2.c", 118 "dsp/rescaler_mips_dsp_r2.c",
95 "dsp/rescaler_msa.c", 119 "dsp/rescaler_msa.c",
96 "dsp/upsampling.c", 120 "dsp/upsampling.c",
97 "dsp/upsampling_mips_dsp_r2.c", 121 "dsp/upsampling_mips_dsp_r2.c",
98 "dsp/upsampling_msa.c", 122 "dsp/upsampling_msa.c",
99 "dsp/yuv.c", 123 "dsp/yuv.c",
124 "dsp/yuv.h",
100 "dsp/yuv_mips32.c", 125 "dsp/yuv_mips32.c",
101 "dsp/yuv_mips_dsp_r2.c", 126 "dsp/yuv_mips_dsp_r2.c",
102 ] 127 ]
103 configs -= [ "//build/config/compiler:chromium_code" ] 128 configs -= [ "//build/config/compiler:chromium_code" ]
104 configs += [ "//build/config/compiler:no_chromium_code" ] 129 configs += [ "//build/config/compiler:no_chromium_code" ]
105 if (set_opt_level) { 130 if (set_opt_level) {
106 configs -= [ "//build/config/compiler:default_optimization" ] 131 configs -= [ "//build/config/compiler:default_optimization" ]
107 configs += [ "//build/config/compiler:optimize_max" ] 132 configs += [ "//build/config/compiler:optimize_max" ]
108 } 133 }
109 134
110 all_dependent_configs = [ ":libwebp_config" ] 135 all_dependent_configs = [ ":libwebp_config" ]
111 deps = [ 136 deps = [
112 ":libwebp_dsp_sse2", 137 ":libwebp_dsp_sse2",
113 ":libwebp_dsp_sse41", 138 ":libwebp_dsp_sse41",
139 ":libwebp_headers",
114 ":libwebp_utils", 140 ":libwebp_utils",
115 ] 141 ]
116 if (is_android) { 142 if (is_android) {
117 deps += [ "//third_party/android_tools:cpu_features" ] 143 deps += [ "//third_party/android_tools:cpu_features" ]
118 144
119 configs -= [ "//build/config/android:default_cygprofile_instrumentation" ] 145 configs -= [ "//build/config/android:default_cygprofile_instrumentation" ]
120 configs += [ "//build/config/android:no_cygprofile_instrumentation" ] 146 configs += [ "//build/config/android:no_cygprofile_instrumentation" ]
121 } 147 }
122 if (current_cpu == "x86" || current_cpu == "x64") { 148 if (current_cpu == "x86" || current_cpu == "x64") {
123 defines = [ 149 defines = [
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 configs += [ "//build/config/android:no_cygprofile_instrumentation" ] 240 configs += [ "//build/config/android:no_cygprofile_instrumentation" ]
215 } 241 }
216 } 242 }
217 } # use_dsp_neon 243 } # use_dsp_neon
218 244
219 static_library("libwebp_enc") { 245 static_library("libwebp_enc") {
220 sources = [ 246 sources = [
221 "enc/alpha_enc.c", 247 "enc/alpha_enc.c",
222 "enc/analysis_enc.c", 248 "enc/analysis_enc.c",
223 "enc/backward_references_enc.c", 249 "enc/backward_references_enc.c",
250 "enc/backward_references_enc.h",
224 "enc/config_enc.c", 251 "enc/config_enc.c",
225 "enc/cost_enc.c", 252 "enc/cost_enc.c",
253 "enc/cost_enc.h",
226 "enc/delta_palettization_enc.c", 254 "enc/delta_palettization_enc.c",
255 "enc/delta_palettization_enc.h",
227 "enc/filter_enc.c", 256 "enc/filter_enc.c",
228 "enc/frame_enc.c", 257 "enc/frame_enc.c",
229 "enc/histogram_enc.c", 258 "enc/histogram_enc.c",
259 "enc/histogram_enc.h",
230 "enc/iterator_enc.c", 260 "enc/iterator_enc.c",
231 "enc/near_lossless_enc.c", 261 "enc/near_lossless_enc.c",
232 "enc/picture_csp_enc.c", 262 "enc/picture_csp_enc.c",
233 "enc/picture_enc.c", 263 "enc/picture_enc.c",
234 "enc/picture_psnr_enc.c", 264 "enc/picture_psnr_enc.c",
235 "enc/picture_rescale_enc.c", 265 "enc/picture_rescale_enc.c",
236 "enc/picture_tools_enc.c", 266 "enc/picture_tools_enc.c",
237 "enc/predictor_enc.c", 267 "enc/predictor_enc.c",
238 "enc/quant_enc.c", 268 "enc/quant_enc.c",
239 "enc/syntax_enc.c", 269 "enc/syntax_enc.c",
240 "enc/token_enc.c", 270 "enc/token_enc.c",
241 "enc/tree_enc.c", 271 "enc/tree_enc.c",
272 "enc/vp8i_enc.h",
242 "enc/vp8l_enc.c", 273 "enc/vp8l_enc.c",
274 "enc/vp8li_enc.h",
243 "enc/webp_enc.c", 275 "enc/webp_enc.c",
244 ] 276 ]
245 configs -= [ "//build/config/compiler:chromium_code" ] 277 configs -= [ "//build/config/compiler:chromium_code" ]
246 configs += [ "//build/config/compiler:no_chromium_code" ] 278 configs += [ "//build/config/compiler:no_chromium_code" ]
247 if (set_opt_level) { 279 if (set_opt_level) {
248 configs -= [ "//build/config/compiler:default_optimization" ] 280 configs -= [ "//build/config/compiler:default_optimization" ]
249 configs += [ "//build/config/compiler:optimize_max" ] 281 configs += [ "//build/config/compiler:optimize_max" ]
250 } 282 }
251 283
252 all_dependent_configs = [ ":libwebp_config" ] 284 all_dependent_configs = [ ":libwebp_config" ]
253 285
254 deps = [ 286 deps = [
287 ":libwebp_headers",
255 ":libwebp_utils", 288 ":libwebp_utils",
256 ] 289 ]
257 } 290 }
258 291
259 config("libwebp_utils_warnings") { 292 config("libwebp_utils_warnings") {
260 if (is_clang) { 293 if (is_clang) {
261 # See https://code.google.com/p/webp/issues/detail?id=253. 294 # See https://code.google.com/p/webp/issues/detail?id=253.
262 cflags = [ "-Wno-incompatible-pointer-types" ] 295 cflags = [ "-Wno-incompatible-pointer-types" ]
263 } 296 }
264 } 297 }
265 298
266 static_library("libwebp_utils") { 299 static_library("libwebp_utils") {
267 sources = [ 300 sources = [
301 "utils/bit_reader_inl_utils.h",
268 "utils/bit_reader_utils.c", 302 "utils/bit_reader_utils.c",
303 "utils/bit_reader_utils.h",
269 "utils/bit_writer_utils.c", 304 "utils/bit_writer_utils.c",
305 "utils/bit_writer_utils.h",
270 "utils/color_cache_utils.c", 306 "utils/color_cache_utils.c",
307 "utils/color_cache_utils.h",
308 "utils/endian_inl_utils.h",
271 "utils/filters_utils.c", 309 "utils/filters_utils.c",
310 "utils/filters_utils.h",
272 "utils/huffman_encode_utils.c", 311 "utils/huffman_encode_utils.c",
312 "utils/huffman_encode_utils.h",
273 "utils/huffman_utils.c", 313 "utils/huffman_utils.c",
314 "utils/huffman_utils.h",
274 "utils/quant_levels_dec_utils.c", 315 "utils/quant_levels_dec_utils.c",
316 "utils/quant_levels_dec_utils.h",
275 "utils/quant_levels_utils.c", 317 "utils/quant_levels_utils.c",
318 "utils/quant_levels_utils.h",
276 "utils/random_utils.c", 319 "utils/random_utils.c",
320 "utils/random_utils.h",
277 "utils/rescaler_utils.c", 321 "utils/rescaler_utils.c",
322 "utils/rescaler_utils.h",
278 "utils/thread_utils.c", 323 "utils/thread_utils.c",
324 "utils/thread_utils.h",
279 "utils/utils.c", 325 "utils/utils.c",
326 "utils/utils.h",
280 ] 327 ]
281 configs -= [ "//build/config/compiler:chromium_code" ] 328 configs -= [ "//build/config/compiler:chromium_code" ]
282 configs += [ "//build/config/compiler:no_chromium_code" ] 329 configs += [ "//build/config/compiler:no_chromium_code" ]
283 if (set_opt_level) { 330 if (set_opt_level) {
284 configs -= [ "//build/config/compiler:default_optimization" ] 331 configs -= [ "//build/config/compiler:default_optimization" ]
285 configs += [ "//build/config/compiler:optimize_max" ] 332 configs += [ "//build/config/compiler:optimize_max" ]
286 } 333 }
287 334
288 all_dependent_configs = [ ":libwebp_config" ] 335 all_dependent_configs = [ ":libwebp_config" ]
289 336
290 public_configs = [ ":libwebp_utils_warnings" ] 337 public_configs = [ ":libwebp_utils_warnings" ]
291 } 338 }
292 339
293 group("libwebp") { 340 group("libwebp") {
294 deps = [ 341 deps = [
295 ":libwebp_dec", 342 ":libwebp_dec",
296 ":libwebp_demux", 343 ":libwebp_demux",
297 ":libwebp_dsp", 344 ":libwebp_dsp",
298 ":libwebp_enc", 345 ":libwebp_enc",
299 ":libwebp_utils", 346 ":libwebp_utils",
300 ] 347 ]
301 public_configs = [ ":libwebp_config" ] 348 public_configs = [ ":libwebp_config" ]
302 if (use_dsp_neon) { 349 if (use_dsp_neon) {
303 deps += [ ":libwebp_dsp_neon" ] 350 deps += [ ":libwebp_dsp_neon" ]
304 } 351 }
305 } 352 }
OLDNEW
« no previous file with comments | « components/image_fetcher/ios/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698