OLD | NEW |
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 && (cpu_arch == "x86" || cpu_arch == "x64")) { | 10 if (!is_ios && (cpu_arch == "x86" || cpu_arch == "x64")) { |
11 sources = [ "crc_folding.c", "fill_window_sse.c" ] | 11 sources = [ |
| 12 "crc_folding.c", |
| 13 "fill_window_sse.c", |
| 14 ] |
12 if (!is_win || is_clang) { | 15 if (!is_win || is_clang) { |
13 cflags = [ "-msse4.2", "-mpclmul" ] | 16 cflags = [ |
| 17 "-msse4.2", |
| 18 "-mpclmul", |
| 19 ] |
14 } | 20 } |
15 } else { | 21 } else { |
16 sources = [ "simd_stub.c"] | 22 sources = [ |
| 23 "simd_stub.c", |
| 24 ] |
17 } | 25 } |
18 | 26 |
19 configs -= [ "//build/config/compiler:chromium_code" ] | 27 configs -= [ "//build/config/compiler:chromium_code" ] |
20 configs += [ "//build/config/compiler:no_chromium_code" ] | 28 configs += [ "//build/config/compiler:no_chromium_code" ] |
21 } | 29 } |
22 | 30 |
23 static_library("zlib") { | 31 static_library("zlib") { |
24 if (!is_win) { | 32 if (!is_win) { |
25 # Don't stomp on "libzlib" on other platforms. | 33 # Don't stomp on "libzlib" on other platforms. |
26 output_name = "chrome_zlib" | 34 output_name = "chrome_zlib" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 ] | 66 ] |
59 | 67 |
60 if (!is_ios && (cpu_arch == "x86" || cpu_arch == "x64")) { | 68 if (!is_ios && (cpu_arch == "x86" || cpu_arch == "x64")) { |
61 sources += [ "x86.c" ] | 69 sources += [ "x86.c" ] |
62 } | 70 } |
63 | 71 |
64 configs -= [ "//build/config/compiler:chromium_code" ] | 72 configs -= [ "//build/config/compiler:chromium_code" ] |
65 configs += [ "//build/config/compiler:no_chromium_code" ] | 73 configs += [ "//build/config/compiler:no_chromium_code" ] |
66 | 74 |
67 public_configs = [ ":zlib_config" ] | 75 public_configs = [ ":zlib_config" ] |
68 deps = [ ":zlib_x86_simd" ] | 76 deps = [ |
| 77 ":zlib_x86_simd", |
| 78 ] |
69 } | 79 } |
70 | 80 |
71 static_library("minizip") { | 81 static_library("minizip") { |
72 sources = [ | 82 sources = [ |
73 "contrib/minizip/ioapi.c", | 83 "contrib/minizip/ioapi.c", |
74 "contrib/minizip/ioapi.h", | 84 "contrib/minizip/ioapi.h", |
75 "contrib/minizip/iowin32.c", | 85 "contrib/minizip/iowin32.c", |
76 "contrib/minizip/iowin32.h", | 86 "contrib/minizip/iowin32.h", |
77 "contrib/minizip/unzip.c", | 87 "contrib/minizip/unzip.c", |
78 "contrib/minizip/unzip.h", | 88 "contrib/minizip/unzip.h", |
(...skipping 11 matching lines...) Expand all Loading... |
90 # Mac, Android and the BSDs don't have fopen64, ftello64, or fseeko64. We | 100 # Mac, Android and the BSDs don't have fopen64, ftello64, or fseeko64. We |
91 # use fopen, ftell, and fseek instead on these systems. | 101 # use fopen, ftell, and fseek instead on these systems. |
92 defines = [ "USE_FILE32API" ] | 102 defines = [ "USE_FILE32API" ] |
93 } | 103 } |
94 | 104 |
95 if (is_clang) { | 105 if (is_clang) { |
96 # zlib uses `if ((a == b))` for some reason. | 106 # zlib uses `if ((a == b))` for some reason. |
97 cflags = [ "-Wno-parentheses-equality" ] | 107 cflags = [ "-Wno-parentheses-equality" ] |
98 } | 108 } |
99 | 109 |
100 deps = [ ":zlib" ] | 110 deps = [ |
| 111 ":zlib", |
| 112 ] |
101 | 113 |
102 configs -= [ "//build/config/compiler:chromium_code" ] | 114 configs -= [ "//build/config/compiler:chromium_code" ] |
103 configs += [ "//build/config/compiler:no_chromium_code" ] | 115 configs += [ "//build/config/compiler:no_chromium_code" ] |
104 public_configs = [ ":zlib_config" ] | 116 public_configs = [ ":zlib_config" ] |
105 } | 117 } |
106 | 118 |
107 static_library("zip") { | 119 static_library("zip") { |
108 sources = [ | 120 sources = [ |
109 "google/zip.cc", | 121 "google/zip.cc", |
110 "google/zip.h", | 122 "google/zip.h", |
111 "google/zip_internal.cc", | 123 "google/zip_internal.cc", |
112 "google/zip_internal.h", | 124 "google/zip_internal.h", |
113 "google/zip_reader.cc", | 125 "google/zip_reader.cc", |
114 "google/zip_reader.h", | 126 "google/zip_reader.h", |
115 ] | 127 ] |
116 deps = [ | 128 deps = [ |
117 ":minizip", | 129 ":minizip", |
118 "//base", | 130 "//base", |
119 ] | 131 ] |
120 } | 132 } |
OLD | NEW |