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

Side by Side Diff: crypto/BUILD.gn

Issue 709593004: Make *some* version of the Win GN build work. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: turn off tcmalloc altogether Created 6 years, 1 month 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
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 import("//build/config/crypto.gni") 5 import("//build/config/crypto.gni")
6 6
7 component("crypto") { 7 component("crypto") {
8 output_name = "crcrypto" # Avoid colliding with OpenSSL's libcrypto. 8 output_name = "crcrypto" # Avoid colliding with OpenSSL's libcrypto.
9 sources = [ 9 sources = [
10 "apple_keychain.h", 10 "apple_keychain.h",
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 "secure_hash_openssl.cc", 161 "secure_hash_openssl.cc",
162 "signature_creator_openssl.cc", 162 "signature_creator_openssl.cc",
163 "signature_verifier_openssl.cc", 163 "signature_verifier_openssl.cc",
164 "symmetric_key_openssl.cc", 164 "symmetric_key_openssl.cc",
165 ] 165 ]
166 } 166 }
167 167
168 defines = [ "CRYPTO_IMPLEMENTATION" ] 168 defines = [ "CRYPTO_IMPLEMENTATION" ]
169 } 169 }
170 170
171 if (is_win) { 171 # TODO(GYP): TODO(dpranke), fix the compile errors for this stuff
172 # and make it work.
173 if (false && is_win) {
172 # A minimal crypto subset for hmac-related stuff that small standalone 174 # A minimal crypto subset for hmac-related stuff that small standalone
173 # targets can use to reduce code size on Windows. This does not depend on 175 # targets can use to reduce code size on Windows. This does not depend on
174 # OpenSSL/NSS but will use Windows APIs for that functionality. 176 # OpenSSL/NSS but will use Windows APIs for that functionality.
175 source_set("crypto_minimal_win") { 177 source_set("crypto_minimal_win") {
176 sources = [ 178 sources = [
177 "crypto_export.h", 179 "crypto_export.h",
178 "hmac.cc", 180 "hmac.cc",
179 "hmac.h", 181 "hmac.h",
180 "hmac_win.cc", 182 "hmac_win.cc",
181 "scoped_capi_types.h", 183 "scoped_capi_types.h",
182 "scoped_nss_types.h", 184 "scoped_nss_types.h",
183 "secure_util.cc", 185 "secure_util.cc",
184 "secure_util.h", 186 "secure_util.h",
185 "symmetric_key.h", 187 "symmetric_key.h",
186 "symmetric_key_win.cc", 188 "symmetric_key_win.cc",
187 "third_party/nss/chromium-blapi.h", 189 "third_party/nss/chromium-blapi.h",
188 "third_party/nss/chromium-sha256.h", 190 "third_party/nss/chromium-sha256.h",
189 "third_party/nss/sha512.cc", 191 "third_party/nss/sha512.cc",
190 ] 192 ]
191 193
192 deps = [ 194 deps = [
193 "//base", 195 "//base",
194 "//base/third_party/dynamic_annotations", 196 "//base/third_party/dynamic_annotations",
195 ] 197 ]
196 198
197 defines = [ "CRYPTO_IMPLEMENTATION" ] 199 defines = [ "CRYPTO_IMPLEMENTATION" ]
198 } 200 }
199 } 201 }
200 202
201 test("crypto_unittests") { 203 # TODO(GYP): Make this link on win as well.
202 sources = [ 204 if (!is_win) {
203 # Tests. 205 test("crypto_unittests") {
204 "curve25519_unittest.cc", 206 sources = [
205 "ec_private_key_unittest.cc", 207 # Tests.
206 "ec_signature_creator_unittest.cc", 208 "curve25519_unittest.cc",
207 "encryptor_unittest.cc", 209 "ec_private_key_unittest.cc",
208 "ghash_unittest.cc", 210 "ec_signature_creator_unittest.cc",
209 "hkdf_unittest.cc", 211 "encryptor_unittest.cc",
210 "hmac_unittest.cc", 212 "ghash_unittest.cc",
211 "nss_util_unittest.cc", 213 "hkdf_unittest.cc",
212 "openssl_bio_string_unittest.cc", 214 "hmac_unittest.cc",
213 "p224_unittest.cc", 215 "nss_util_unittest.cc",
214 "p224_spake_unittest.cc", 216 "openssl_bio_string_unittest.cc",
215 "random_unittest.cc", 217 "p224_unittest.cc",
216 "rsa_private_key_unittest.cc", 218 "p224_spake_unittest.cc",
217 "rsa_private_key_nss_unittest.cc", 219 "random_unittest.cc",
218 "secure_hash_unittest.cc", 220 "rsa_private_key_unittest.cc",
219 "sha2_unittest.cc", 221 "rsa_private_key_nss_unittest.cc",
220 "signature_creator_unittest.cc", 222 "secure_hash_unittest.cc",
221 "signature_verifier_unittest.cc", 223 "sha2_unittest.cc",
222 "symmetric_key_unittest.cc", 224 "signature_creator_unittest.cc",
223 ] 225 "signature_verifier_unittest.cc",
226 "symmetric_key_unittest.cc",
227 ]
224 228
225 if (use_openssl || !is_linux) { 229 if (use_openssl || !is_linux) {
226 sources -= [ 230 sources -= [
227 "rsa_private_key_nss_unittest.cc", 231 "rsa_private_key_nss_unittest.cc",
232 ]
233 }
234
235 if (use_openssl) {
236 sources -= [ "nss_util_unittest.cc" ]
237 } else {
238 sources -= [ "openssl_bio_string_unittest.cc" ]
239 }
240
241 deps = [
242 ":crypto",
243 ":platform",
244 ":test_support",
245 "//base",
246 "//base/test:run_all_unittests",
247 "//base/test:test_support",
248 "//testing/gmock",
249 "//testing/gtest",
228 ] 250 ]
229 } 251 }
230
231 if (use_openssl) {
232 sources -= [ "nss_util_unittest.cc" ]
233 } else {
234 sources -= [ "openssl_bio_string_unittest.cc" ]
235 }
236
237 deps = [
238 ":crypto",
239 ":platform",
240 ":test_support",
241 "//base",
242 "//base/test:run_all_unittests",
243 "//base/test:test_support",
244 "//testing/gmock",
245 "//testing/gtest",
246 ]
247 } 252 }
248 253
249 source_set("test_support") { 254 source_set("test_support") {
250 sources = [ 255 sources = [
251 "scoped_test_nss_db.cc", 256 "scoped_test_nss_db.cc",
252 "scoped_test_nss_db.h", 257 "scoped_test_nss_db.h",
253 "scoped_test_nss_chromeos_user.cc", 258 "scoped_test_nss_chromeos_user.cc",
254 "scoped_test_nss_chromeos_user.h", 259 "scoped_test_nss_chromeos_user.h",
255 "scoped_test_system_nss_key_slot.cc", 260 "scoped_test_system_nss_key_slot.cc",
256 "scoped_test_system_nss_key_slot.h", 261 "scoped_test_system_nss_key_slot.h",
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 ] 307 ]
303 } else { 308 } else {
304 # Non-Linux platforms use the hermetic NSS from the tree. 309 # Non-Linux platforms use the hermetic NSS from the tree.
305 deps += [ 310 deps += [
306 "//third_party/nss:nspr", 311 "//third_party/nss:nspr",
307 "//third_party/nss:nss", 312 "//third_party/nss:nss",
308 ] 313 ]
309 } 314 }
310 } 315 }
311 } 316 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698