Chromium Code Reviews

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

Issue 678423002: Reland "Integrate SIMD optimisations for zlib" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak formatting and add comment about why we need GetProcAddress Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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") {
10 if (cpu_arch == "x86" || cpu_arch == "x64") {
11 sources = [ "crc_folding.c", "fill_window_sse.c" ]
12 cflags = [ "-msse2", "-msse4.2", "-mpclmul" ]
13 } else {
14 sources = [ "simd_stub.c"]
15 }
16 }
17
9 static_library("zlib") { 18 static_library("zlib") {
10 if (!is_win) { 19 if (!is_win) {
11 # Don't stomp on "libzlib" on other platforms. 20 # Don't stomp on "libzlib" on other platforms.
12 output_name = "chrome_zlib" 21 output_name = "chrome_zlib"
13 } 22 }
14 23
15 sources = [ 24 sources = [
16 "adler32.c", 25 "adler32.c",
17 "compress.c", 26 "compress.c",
18 "crc32.c", 27 "crc32.c",
(...skipping 10 matching lines...)
29 "inffast.h", 38 "inffast.h",
30 "inffixed.h", 39 "inffixed.h",
31 "inflate.c", 40 "inflate.c",
32 "inflate.h", 41 "inflate.h",
33 "inftrees.c", 42 "inftrees.c",
34 "inftrees.h", 43 "inftrees.h",
35 "mozzconf.h", 44 "mozzconf.h",
36 "trees.c", 45 "trees.c",
37 "trees.h", 46 "trees.h",
38 "uncompr.c", 47 "uncompr.c",
48 "x86.h",
39 "zconf.h", 49 "zconf.h",
40 "zlib.h", 50 "zlib.h",
41 "zutil.c", 51 "zutil.c",
42 "zutil.h", 52 "zutil.h",
43 ] 53 ]
44 54
55 if (cpu_arch == "x86" || cpu_arch == "x64") {
56 sources += [ "x86.c" ]
57 }
58
45 configs -= [ "//build/config/compiler:chromium_code" ] 59 configs -= [ "//build/config/compiler:chromium_code" ]
46 configs += [ "//build/config/compiler:no_chromium_code" ] 60 configs += [ "//build/config/compiler:no_chromium_code" ]
47 61
48 public_configs = [ ":zlib_config" ] 62 public_configs = [ ":zlib_config" ]
63 deps = [ ":zlib_x86_simd" ]
49 } 64 }
50 65
51 static_library("minizip") { 66 static_library("minizip") {
52 sources = [ 67 sources = [
53 "contrib/minizip/ioapi.c", 68 "contrib/minizip/ioapi.c",
54 "contrib/minizip/ioapi.h", 69 "contrib/minizip/ioapi.h",
55 "contrib/minizip/iowin32.c", 70 "contrib/minizip/iowin32.c",
56 "contrib/minizip/iowin32.h", 71 "contrib/minizip/iowin32.h",
57 "contrib/minizip/unzip.c", 72 "contrib/minizip/unzip.c",
58 "contrib/minizip/unzip.h", 73 "contrib/minizip/unzip.h",
(...skipping 32 matching lines...)
91 "google/zip_internal.cc", 106 "google/zip_internal.cc",
92 "google/zip_internal.h", 107 "google/zip_internal.h",
93 "google/zip_reader.cc", 108 "google/zip_reader.cc",
94 "google/zip_reader.h", 109 "google/zip_reader.h",
95 ] 110 ]
96 deps = [ 111 deps = [
97 ":minizip", 112 ":minizip",
98 "//base", 113 "//base",
99 ] 114 ]
100 } 115 }
OLDNEW

Powered by Google App Engine