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

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

Issue 1509773004: CL for perf tryjob on android Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « third_party/WebKit/LayoutTests/TestExpectations ('k') | third_party/libpng/LICENSE » ('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 config("libpng_config") { 5 config("libpng_config") {
6 include_dirs = [ "." ] 6 include_dirs = [ "." ]
7 7
8 defines = [ 8 defines = [
9 "CHROME_PNG_WRITE_SUPPORT", 9 "CHROME_PNG_WRITE_SUPPORT",
10 "PNG_USER_CONFIG",
11 ] 10 ]
12 11
13 if (is_android) { 12 if (is_android) {
14 #'toolsets': ['target', 'host'], 13 #'toolsets': ['target', 'host'],
15 defines += [ "CHROME_PNG_READ_PACK_SUPPORT" ] # Required by freetype. 14 defines += [ "CHROME_PNG_READ_PACK_SUPPORT" ] # Required by freetype.
15 defines += [ "PNG_ARM_NEON_OPT=2" ]
16 }
17
18 if (is_ios) {
19 defines += [ "PNG_ARM_NEON_OPT=0" ]
16 } 20 }
17 21
18 if (is_win) { 22 if (is_win) {
19 if (is_component_build) { 23 if (is_component_build) {
20 defines += [ 24 defines += [
21 "PNG_USE_DLL", 25 "PNG_USE_DLL",
22 "PNG_NO_MODULEDEF", 26 "PNG_NO_MODULEDEF",
23 ] 27 ]
24 } 28 }
25 } 29 }
26 } 30 }
27 31
28 # Must be in a config because of how GN orders flags (otherwise -Wall will 32 # Must be in a config because of how GN orders flags (otherwise -Wall will
29 # appear after this, and turn it back on). 33 # appear after this, and turn it back on).
30 config("clang_warnings") { 34 config("clang_warnings") {
31 if (is_clang) { 35 if (is_clang) {
32 # Upstream uses self-assignment to avoid warnings. 36 # Upstream uses self-assignment to avoid warnings.
33 cflags = [ "-Wno-self-assign" ] 37 cflags = [ "-Wno-self-assign" ]
34 } 38 }
35 } 39 }
36 40
37 source_set("libpng_sources") { 41 source_set("libpng_sources") {
38 sources = [ 42 sources = [
39 "png.c", 43 "png.c",
40 "png.h", 44 "png.h",
41 "pngconf.h", 45 "pngconf.h",
46 "pngdebug.h",
42 "pngerror.c", 47 "pngerror.c",
43 "pnggccrd.c",
44 "pngget.c", 48 "pngget.c",
49 "pnginfo.h",
50 "pnglibconf.h",
45 "pngmem.c", 51 "pngmem.c",
46 "pngpread.c", 52 "pngpread.c",
53 "pngpriv.h",
47 "pngread.c", 54 "pngread.c",
48 "pngrio.c", 55 "pngrio.c",
49 "pngrtran.c", 56 "pngrtran.c",
50 "pngrutil.c", 57 "pngrutil.c",
51 "pngset.c", 58 "pngset.c",
59 "pngstruct.h",
52 "pngtrans.c", 60 "pngtrans.c",
53 "pngusr.h",
54 "pngvcrd.c",
55 "pngwio.c", 61 "pngwio.c",
56 "pngwrite.c", 62 "pngwrite.c",
57 "pngwtran.c", 63 "pngwtran.c",
58 "pngwutil.c", 64 "pngwutil.c",
59 ] 65 ]
60 66
67 if (target_cpu == "arm" || target_cpu == "arm64") {
68 sources += [
69 "arm/arm_init.c",
70 "arm/filter_neon.S",
71 "arm/filter_neon_intrinsics.c",
72 ]
73 }
74
61 configs -= [ "//build/config/compiler:chromium_code" ] 75 configs -= [ "//build/config/compiler:chromium_code" ]
62 configs += [ "//build/config/compiler:no_chromium_code" ] 76 configs += [ "//build/config/compiler:no_chromium_code" ]
63 77
64 if (is_win && is_component_build) { 78 if (is_win && is_component_build) {
65 defines = [ "PNG_BUILD_DLL" ] 79 defines = [ "PNG_BUILD_DLL" ]
66 } 80 }
67 81
68 public_configs = [ ":libpng_config" ] 82 public_configs = [ ":libpng_config" ]
69 83
70 public_deps = [ 84 public_deps = [
71 "//third_party/zlib", 85 "//third_party/zlib",
72 ] 86 ]
73 87
74 configs += [ ":clang_warnings" ] 88 configs += [ ":clang_warnings" ]
75 } 89 }
76 90
77 if (is_win) { 91 if (is_win) {
78 component("libpng") { 92 component("libpng") {
79 public_deps = [ 93 public_deps = [
80 ":libpng_sources", 94 ":libpng_sources",
81 ] 95 ]
82 } 96 }
83 } else { 97 } else {
84 group("libpng") { 98 group("libpng") {
85 public_deps = [ 99 public_deps = [
86 ":libpng_sources", 100 ":libpng_sources",
87 ] 101 ]
88 } 102 }
89 } 103 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | third_party/libpng/LICENSE » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698