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

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

Issue 2021403002: Update libpng to 1.6.22 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac rebaselines Created 4 years, 6 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
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/chromecast_build.gni") 5 import("//build/config/chromecast_build.gni")
6 6
7 config("libpng_config") { 7 config("libpng_config") {
8 include_dirs = [ "." ] 8 include_dirs = [ "." ]
9 9
10 defines = [ 10 defines = []
11 "CHROME_PNG_WRITE_SUPPORT",
12 "PNG_USER_CONFIG",
13 ]
14 11
15 if (is_android || is_chromecast) { 12 if (is_android || is_chromecast) {
16 #'toolsets': ['target', 'host'], 13 #"toolsets": ["target", "host"],
Nico 2016/06/03 20:27:44 remove this if, it doesn't do anything
msarett 2016/06/03 21:26:01 SGTM
17 defines += [ "CHROME_PNG_READ_PACK_SUPPORT" ] # Required by freetype.
18 } 14 }
19 15
20 if (is_win) { 16 if (is_win) {
21 if (is_component_build) { 17 if (is_component_build) {
22 defines += [ 18 defines += [
23 "PNG_USE_DLL", 19 "PNG_USE_DLL",
24 "PNG_NO_MODULEDEF", 20 "PNG_NO_MODULEDEF",
25 ] 21 ]
26 } 22 }
27 } 23 }
28 } 24 }
29 25
30 # Must be in a config because of how GN orders flags (otherwise -Wall will 26 # Must be in a config because of how GN orders flags (otherwise -Wall will
31 # appear after this, and turn it back on). 27 # appear after this, and turn it back on).
32 config("clang_warnings") { 28 config("clang_warnings") {
33 if (is_clang) { 29 if (is_clang) {
34 # Upstream uses self-assignment to avoid warnings. 30 # Upstream uses self-assignment to avoid warnings.
Nico 2016/06/03 20:27:44 do we still need -Wno-self-assign then?
msarett 2016/06/03 21:26:01 Removing it. The bots should tell us, I think.
msarett 2016/06/06 14:18:15 Looks like we are fine without this, thanks :).
35 cflags = [ "-Wno-self-assign" ] 31 cflags = [
32 "-Wno-self-assign",
33 "-Wno-tautological-constant-out-of-range-compare",
Nico 2016/06/03 20:27:44 is there an upstream bug for this?
msarett 2016/06/03 21:26:01 libpng checks that the width (uint32_t) is not gr
34 ]
36 } 35 }
37 } 36 }
38 37
39 source_set("libpng_sources") { 38 source_set("libpng_sources") {
40 sources = [ 39 sources = [
41 "png.c", 40 "png.c",
42 "png.h",
Nico 2016/06/03 20:27:44 what happened to png.h?
msarett 2016/06/03 21:26:01 I'll put it back. Is it typical to list *.h files
Nico 2016/06/03 21:36:49 Yes, normally we list them. (Since nothing checks
msarett 2016/06/06 14:18:15 Acknowledged.
43 "pngconf.h",
44 "pngerror.c", 41 "pngerror.c",
45 "pnggccrd.c",
46 "pngget.c", 42 "pngget.c",
47 "pngmem.c", 43 "pngmem.c",
48 "pngpread.c", 44 "pngpread.c",
49 "pngread.c", 45 "pngread.c",
50 "pngrio.c", 46 "pngrio.c",
51 "pngrtran.c", 47 "pngrtran.c",
52 "pngrutil.c", 48 "pngrutil.c",
53 "pngset.c", 49 "pngset.c",
54 "pngtrans.c", 50 "pngtrans.c",
55 "pngusr.h",
56 "pngvcrd.c",
57 "pngwio.c", 51 "pngwio.c",
58 "pngwrite.c", 52 "pngwrite.c",
59 "pngwtran.c", 53 "pngwtran.c",
60 "pngwutil.c", 54 "pngwutil.c",
61 ] 55 ]
62 56
57 defines = []
58
59 if (current_cpu == "x86" || current_cpu == "x64") {
60 sources += [
61 "contrib/intel/filter_sse2_intrinsics.c",
62 "contrib/intel/intel_init.c",
63 ]
64 defines += [ "PNG_INTEL_SSE_OPT=1" ]
65 } else if (current_cpu == "arm" || current_cpu == "arm64") {
66 sources += [
67 "arm/arm_init.c",
68 "arm/filter_neon_intrinsics.c",
69 ]
70 defines += [
71 "PNG_ARM_NEON_OPT=2",
72 "PNG_ARM_NEON_IMPLEMENTATION=1",
73 ]
74 }
75
63 configs -= [ "//build/config/compiler:chromium_code" ] 76 configs -= [ "//build/config/compiler:chromium_code" ]
64 configs += [ "//build/config/compiler:no_chromium_code" ] 77 configs += [ "//build/config/compiler:no_chromium_code" ]
65 78
66 if (is_win && is_component_build) { 79 if (is_win && is_component_build) {
67 defines = [ "PNG_BUILD_DLL" ] 80 defines += [ "PNG_BUILD_DLL" ]
68 } 81 }
69 82
70 public_configs = [ ":libpng_config" ] 83 public_configs = [ ":libpng_config" ]
71 84
72 public_deps = [ 85 public_deps = [
73 "//third_party/zlib", 86 "//third_party/zlib",
74 ] 87 ]
75 88
76 configs += [ ":clang_warnings" ] 89 configs += [ ":clang_warnings" ]
77 } 90 }
78 91
79 if (is_win) { 92 if (is_win) {
80 component("libpng") { 93 component("libpng") {
81 public_deps = [ 94 public_deps = [
82 ":libpng_sources", 95 ":libpng_sources",
83 ] 96 ]
84 } 97 }
85 } else { 98 } else {
86 group("libpng") { 99 group("libpng") {
87 public_deps = [ 100 public_deps = [
88 ":libpng_sources", 101 ":libpng_sources",
89 ] 102 ]
90 } 103 }
91 } 104 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698