| 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 && (current_cpu == "x86" || current_cpu == "x64")) { | 10 if (!is_ios && (current_cpu == "x86" || current_cpu == "x64")) { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 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 |
| 31 static_library("zlib") { | 38 static_library("zlib") { |
| 32 if (!is_win) { | 39 if (!is_win) { |
| 33 # Don't stomp on "libzlib" on other platforms. | 40 # Don't stomp on "libzlib" on other platforms. |
| 34 output_name = "chrome_zlib" | 41 output_name = "chrome_zlib" |
| 35 } | 42 } |
| 36 | 43 |
| 37 sources = [ | 44 sources = [ |
| 38 "adler32.c", | 45 "adler32.c", |
| 39 "compress.c", | 46 "compress.c", |
| 40 "crc32.c", | 47 "crc32.c", |
| (...skipping 19 matching lines...) Expand all Loading... |
| 60 "uncompr.c", | 67 "uncompr.c", |
| 61 "x86.h", | 68 "x86.h", |
| 62 "zconf.h", | 69 "zconf.h", |
| 63 "zlib.h", | 70 "zlib.h", |
| 64 "zutil.c", | 71 "zutil.c", |
| 65 "zutil.h", | 72 "zutil.h", |
| 66 ] | 73 ] |
| 67 | 74 |
| 68 if (!is_ios && (current_cpu == "x86" || current_cpu == "x64")) { | 75 if (!is_ios && (current_cpu == "x86" || current_cpu == "x64")) { |
| 69 sources += [ "x86.c" ] | 76 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 += [ "//build/config/compiler:no_chromium_code" ] | 80 configs += [ |
| 81 ":zlib_warnings", |
| 82 "//build/config/compiler:no_chromium_code", |
| 83 ] |
| 81 | 84 |
| 82 public_configs = [ ":zlib_config" ] | 85 public_configs = [ ":zlib_config" ] |
| 83 deps = [ | 86 deps = [ |
| 84 ":zlib_x86_simd", | 87 ":zlib_x86_simd", |
| 85 ] | 88 ] |
| 86 } | 89 } |
| 87 | 90 |
| 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 |
| 88 static_library("minizip") { | 99 static_library("minizip") { |
| 89 sources = [ | 100 sources = [ |
| 90 "contrib/minizip/ioapi.c", | 101 "contrib/minizip/ioapi.c", |
| 91 "contrib/minizip/ioapi.h", | 102 "contrib/minizip/ioapi.h", |
| 92 "contrib/minizip/iowin32.c", | 103 "contrib/minizip/iowin32.c", |
| 93 "contrib/minizip/iowin32.h", | 104 "contrib/minizip/iowin32.h", |
| 94 "contrib/minizip/unzip.c", | 105 "contrib/minizip/unzip.c", |
| 95 "contrib/minizip/unzip.h", | 106 "contrib/minizip/unzip.h", |
| 96 "contrib/minizip/zip.c", | 107 "contrib/minizip/zip.c", |
| 97 "contrib/minizip/zip.h", | 108 "contrib/minizip/zip.h", |
| 98 ] | 109 ] |
| 99 | 110 |
| 100 if (!is_win) { | 111 if (!is_win) { |
| 101 sources -= [ | 112 sources -= [ |
| 102 "contrib/minizip/iowin32.c", | 113 "contrib/minizip/iowin32.c", |
| 103 "contrib/minizip/iowin32.h", | 114 "contrib/minizip/iowin32.h", |
| 104 ] | 115 ] |
| 105 } | 116 } |
| 106 if (is_mac || is_ios || is_android) { | 117 if (is_mac || is_ios || is_android) { |
| 107 # Mac, Android and the BSDs don't have fopen64, ftello64, or fseeko64. We | 118 # Mac, Android and the BSDs don't have fopen64, ftello64, or fseeko64. We |
| 108 # use fopen, ftell, and fseek instead on these systems. | 119 # use fopen, ftell, and fseek instead on these systems. |
| 109 defines = [ "USE_FILE32API" ] | 120 defines = [ "USE_FILE32API" ] |
| 110 } | 121 } |
| 111 | 122 |
| 112 deps = [ | 123 deps = [ |
| 113 ":zlib", | 124 ":zlib", |
| 114 ] | 125 ] |
| 115 | 126 |
| 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 | |
| 123 configs -= [ "//build/config/compiler:chromium_code" ] | 127 configs -= [ "//build/config/compiler:chromium_code" ] |
| 124 configs += [ "//build/config/compiler:no_chromium_code" ] | 128 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 125 configs += [ ":minizip_warnings" ] | 129 configs += [ ":minizip_warnings" ] |
| 126 public_configs = [ ":zlib_config" ] | 130 public_configs = [ ":zlib_config" ] |
| 127 } | 131 } |
| 128 | 132 |
| 129 static_library("zip") { | 133 static_library("zip") { |
| 130 sources = [ | 134 sources = [ |
| 131 "google/zip.cc", | 135 "google/zip.cc", |
| 132 "google/zip.h", | 136 "google/zip.h", |
| 133 "google/zip_internal.cc", | 137 "google/zip_internal.cc", |
| 134 "google/zip_internal.h", | 138 "google/zip_internal.h", |
| 135 "google/zip_reader.cc", | 139 "google/zip_reader.cc", |
| 136 "google/zip_reader.h", | 140 "google/zip_reader.h", |
| 137 ] | 141 ] |
| 138 deps = [ | 142 deps = [ |
| 139 ":minizip", | 143 ":minizip", |
| 140 "//base", | 144 "//base", |
| 141 ] | 145 ] |
| 142 } | 146 } |
| OLD | NEW |