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 if (cpu_arch == "x86" || cpu_arch == "x64") { | |
8 defines = [ "ZLIB_X86_SIMD" ] | |
agl
2014/10/17 00:45:34
ditto about not adding a #define.
robert.bradford
2014/10/20 16:45:54
Acknowledged.
| |
9 } | |
10 } | |
11 | |
12 static_library("zlib_x86_simd") { | |
13 if (cpu_arch == "x86" || cpu_arch == "x64") { | |
14 sources = [ "crc_folding.c", "fill_window_sse.c" ] | |
15 cflags = [ "-msse2", "-msse4.2", "-mpclmul" ] | |
16 } else { | |
17 sources = [ "simd_stub.c"] | |
18 } | |
7 } | 19 } |
8 | 20 |
9 static_library("zlib") { | 21 static_library("zlib") { |
10 if (!is_win) { | 22 if (!is_win) { |
11 # Don't stomp on "libzlib" on other platforms. | 23 # Don't stomp on "libzlib" on other platforms. |
12 output_name = "chrome_zlib" | 24 output_name = "chrome_zlib" |
13 } | 25 } |
14 | 26 |
15 sources = [ | 27 sources = [ |
16 "adler32.c", | 28 "adler32.c", |
(...skipping 12 matching lines...) Expand all Loading... | |
29 "inffast.h", | 41 "inffast.h", |
30 "inffixed.h", | 42 "inffixed.h", |
31 "inflate.c", | 43 "inflate.c", |
32 "inflate.h", | 44 "inflate.h", |
33 "inftrees.c", | 45 "inftrees.c", |
34 "inftrees.h", | 46 "inftrees.h", |
35 "mozzconf.h", | 47 "mozzconf.h", |
36 "trees.c", | 48 "trees.c", |
37 "trees.h", | 49 "trees.h", |
38 "uncompr.c", | 50 "uncompr.c", |
51 "x86.h", | |
39 "zconf.h", | 52 "zconf.h", |
40 "zlib.h", | 53 "zlib.h", |
41 "zutil.c", | 54 "zutil.c", |
42 "zutil.h", | 55 "zutil.h", |
43 ] | 56 ] |
44 | 57 |
58 if (cpu_arch == "x86" || cpu_arch == "x64") { | |
59 sources += [ "x86.c" ] | |
60 } | |
61 | |
45 configs -= [ "//build/config/compiler:chromium_code" ] | 62 configs -= [ "//build/config/compiler:chromium_code" ] |
46 configs += [ "//build/config/compiler:no_chromium_code" ] | 63 configs += [ "//build/config/compiler:no_chromium_code" ] |
47 | 64 |
48 public_configs = [ ":zlib_config" ] | 65 public_configs = [ ":zlib_config" ] |
66 deps = [ ":zlib_x86_simd" ] | |
49 } | 67 } |
50 | 68 |
51 static_library("minizip") { | 69 static_library("minizip") { |
52 sources = [ | 70 sources = [ |
53 "contrib/minizip/ioapi.c", | 71 "contrib/minizip/ioapi.c", |
54 "contrib/minizip/ioapi.h", | 72 "contrib/minizip/ioapi.h", |
55 "contrib/minizip/iowin32.c", | 73 "contrib/minizip/iowin32.c", |
56 "contrib/minizip/iowin32.h", | 74 "contrib/minizip/iowin32.h", |
57 "contrib/minizip/unzip.c", | 75 "contrib/minizip/unzip.c", |
58 "contrib/minizip/unzip.h", | 76 "contrib/minizip/unzip.h", |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
91 "google/zip_internal.cc", | 109 "google/zip_internal.cc", |
92 "google/zip_internal.h", | 110 "google/zip_internal.h", |
93 "google/zip_reader.cc", | 111 "google/zip_reader.cc", |
94 "google/zip_reader.h", | 112 "google/zip_reader.h", |
95 ] | 113 ] |
96 deps = [ | 114 deps = [ |
97 ":minizip", | 115 ":minizip", |
98 "//base", | 116 "//base", |
99 ] | 117 ] |
100 } | 118 } |
OLD | NEW |