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

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

Issue 1316843006: Revert of Un-nest configs in GN files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | « third_party/yasm/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 (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 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("zlib_config") { 5 config("zlib_config") {
6 include_dirs = [ "." ] 6 include_dirs = [ "." ]
7 } 7 }
8 8
9 static_library("zlib_x86_simd") { 9 static_library("zlib_x86_simd") {
10 if (!is_ios && (current_cpu == "x86" || current_cpu == "x64")) { 10 if (!is_ios && (current_cpu == "x86" || current_cpu == "x64")) {
(...skipping 10 matching lines...) Expand all
21 } else { 21 } else {
22 sources = [ 22 sources = [
23 "simd_stub.c", 23 "simd_stub.c",
24 ] 24 ]
25 } 25 }
26 26
27 configs -= [ "//build/config/compiler:chromium_code" ] 27 configs -= [ "//build/config/compiler:chromium_code" ]
28 configs += [ "//build/config/compiler:no_chromium_code" ] 28 configs += [ "//build/config/compiler:no_chromium_code" ]
29 } 29 }
30 30
31 config("zlib_warnings") {
32 if (is_clang && !is_ios &&
33 (current_cpu == "x86" || current_cpu == "x64")) {
34 cflags = [ "-Wno-incompatible-pointer-types" ]
35 }
36 }
37
38 static_library("zlib") { 31 static_library("zlib") {
39 if (!is_win) { 32 if (!is_win) {
40 # Don't stomp on "libzlib" on other platforms. 33 # Don't stomp on "libzlib" on other platforms.
41 output_name = "chrome_zlib" 34 output_name = "chrome_zlib"
42 } 35 }
43 36
44 sources = [ 37 sources = [
45 "adler32.c", 38 "adler32.c",
46 "compress.c", 39 "compress.c",
47 "crc32.c", 40 "crc32.c",
(...skipping 19 matching lines...) Expand all
67 "uncompr.c", 60 "uncompr.c",
68 "x86.h", 61 "x86.h",
69 "zconf.h", 62 "zconf.h",
70 "zlib.h", 63 "zlib.h",
71 "zutil.c", 64 "zutil.c",
72 "zutil.h", 65 "zutil.h",
73 ] 66 ]
74 67
75 if (!is_ios && (current_cpu == "x86" || current_cpu == "x64")) { 68 if (!is_ios && (current_cpu == "x86" || current_cpu == "x64")) {
76 sources += [ "x86.c" ] 69 sources += [ "x86.c" ]
70
71 config("zlib_warnings") {
72 if (is_clang) {
73 cflags = [ "-Wno-incompatible-pointer-types" ]
74 }
75 }
76 configs += [ ":zlib_warnings" ]
77 } 77 }
78 78
79 configs -= [ "//build/config/compiler:chromium_code" ] 79 configs -= [ "//build/config/compiler:chromium_code" ]
80 configs += [ 80 configs += [ "//build/config/compiler:no_chromium_code" ]
81 ":zlib_warnings",
82 "//build/config/compiler:no_chromium_code",
83 ]
84 81
85 public_configs = [ ":zlib_config" ] 82 public_configs = [ ":zlib_config" ]
86 deps = [ 83 deps = [
87 ":zlib_x86_simd", 84 ":zlib_x86_simd",
88 ] 85 ]
89 } 86 }
90 87
91 config("minizip_warnings") {
92 visibility = [ ":*" ]
93 if (is_clang) {
94 # zlib uses `if ((a == b))` for some reason.
95 cflags = [ "-Wno-parentheses-equality" ]
96 }
97 }
98
99 static_library("minizip") { 88 static_library("minizip") {
100 sources = [ 89 sources = [
101 "contrib/minizip/ioapi.c", 90 "contrib/minizip/ioapi.c",
102 "contrib/minizip/ioapi.h", 91 "contrib/minizip/ioapi.h",
103 "contrib/minizip/iowin32.c", 92 "contrib/minizip/iowin32.c",
104 "contrib/minizip/iowin32.h", 93 "contrib/minizip/iowin32.h",
105 "contrib/minizip/unzip.c", 94 "contrib/minizip/unzip.c",
106 "contrib/minizip/unzip.h", 95 "contrib/minizip/unzip.h",
107 "contrib/minizip/zip.c", 96 "contrib/minizip/zip.c",
108 "contrib/minizip/zip.h", 97 "contrib/minizip/zip.h",
109 ] 98 ]
110 99
111 if (!is_win) { 100 if (!is_win) {
112 sources -= [ 101 sources -= [
113 "contrib/minizip/iowin32.c", 102 "contrib/minizip/iowin32.c",
114 "contrib/minizip/iowin32.h", 103 "contrib/minizip/iowin32.h",
115 ] 104 ]
116 } 105 }
117 if (is_mac || is_ios || is_android) { 106 if (is_mac || is_ios || is_android) {
118 # Mac, Android and the BSDs don't have fopen64, ftello64, or fseeko64. We 107 # Mac, Android and the BSDs don't have fopen64, ftello64, or fseeko64. We
119 # use fopen, ftell, and fseek instead on these systems. 108 # use fopen, ftell, and fseek instead on these systems.
120 defines = [ "USE_FILE32API" ] 109 defines = [ "USE_FILE32API" ]
121 } 110 }
122 111
123 deps = [ 112 deps = [
124 ":zlib", 113 ":zlib",
125 ] 114 ]
126 115
116 config("minizip_warnings") {
117 if (is_clang) {
118 # zlib uses `if ((a == b))` for some reason.
119 cflags = [ "-Wno-parentheses-equality" ]
120 }
121 }
122
127 configs -= [ "//build/config/compiler:chromium_code" ] 123 configs -= [ "//build/config/compiler:chromium_code" ]
128 configs += [ "//build/config/compiler:no_chromium_code" ] 124 configs += [ "//build/config/compiler:no_chromium_code" ]
129 configs += [ ":minizip_warnings" ] 125 configs += [ ":minizip_warnings" ]
130 public_configs = [ ":zlib_config" ] 126 public_configs = [ ":zlib_config" ]
131 } 127 }
132 128
133 static_library("zip") { 129 static_library("zip") {
134 sources = [ 130 sources = [
135 "google/zip.cc", 131 "google/zip.cc",
136 "google/zip.h", 132 "google/zip.h",
137 "google/zip_internal.cc", 133 "google/zip_internal.cc",
138 "google/zip_internal.h", 134 "google/zip_internal.h",
139 "google/zip_reader.cc", 135 "google/zip_reader.cc",
140 "google/zip_reader.h", 136 "google/zip_reader.h",
141 ] 137 ]
142 deps = [ 138 deps = [
143 ":minizip", 139 ":minizip",
144 "//base", 140 "//base",
145 ] 141 ]
146 } 142 }
OLDNEW
« no previous file with comments | « third_party/yasm/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698