OLD | NEW |
---|---|
1 # Copyright 2014 The Chromium Authors. All rights reserved. | |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 | |
5 # Config for us and everybody else depending on openssl. | |
6 config("openssl_config") { | |
7 include_dirs = [] | |
8 if (cpu_arch == "x64") { | |
9 # Ensure the 64-bit opensslconf.h header is used in preference to the one | |
10 # in openssl/include. | |
11 include_dirs += [ "config/x64" ] | |
12 } | |
13 | |
14 include_dirs += [ "openssl/include" ] | |
15 } | |
16 | |
17 # Config internal to this build file. | |
18 config("openssl_internal_config") { | |
19 visibility = ":*" # Only targets in this file can depend on this. | |
20 } | |
21 | |
22 # The list of OpenSSL files is kept in skia_gn_files.gypi. Read it. | |
tfarina
2014/04/11 18:19:36
skia_gn_files.gypi? I think you meant openssl.gypi
| |
23 gypi_values = exec_script( | |
24 "//build/gypi_to_gn.py", | |
25 [ rebase_path("//third_party/openssl/openssl.gypi") ] | |
26 "scope", | |
27 [ "//third_party/openssl/openssl.gypi" ]) | |
28 | |
1 component("openssl") { | 29 component("openssl") { |
2 external = true | 30 sources = gypi_values.openssl_common_sources |
3 gyp_file = "openssl.gyp" | 31 |
32 defines = gypi_values.openssl_common_defines | |
33 defines += [ | |
34 "PURIFY", | |
35 "MONOLITH", | |
36 ] | |
37 | |
38 direct_dependent_configs = [ ":openssl_config" ] | |
39 | |
40 cflags = [] | |
41 | |
42 # Also gets the include dirs from :openssl_config | |
43 include_dirs = [ | |
44 ".", | |
45 "openssl", | |
46 "openssl/crypto", | |
47 "openssl/crypto/asn1", | |
48 "openssl/crypto/evp", | |
49 "openssl/crypto/modes", | |
50 ] | |
51 | |
52 if (is_posix && !is_android) { | |
53 defines += [ | |
54 # ENGINESDIR must be defined if OPENSSLDIR is. | |
55 "ENGINESDIR=\"/dev/null\"", | |
56 # Set to ubuntu default path for convenience. If necessary, override | |
57 # this at runtime with the SSL_CERT_DIR environment variable. | |
58 "OPENSSLDIR=\"/etc/ssl\"", | |
59 ] | |
60 } | |
61 | |
62 if (cpu_arch == "x64") { | |
63 sources += gypi_values.openssl_x86_64_sources | |
64 sources -= gypi_values.openssl_x86_64_source_excludes | |
65 defines += gypi_values.openssl_x86_64_defines | |
66 } else if (cpu_arch == "x86") { | |
67 sources += gypi_values.openssl_x86_sources | |
68 sources -= gypi_values.openssl_x86_source_excludes | |
69 defines += gypi_values.openssl_x86_defines | |
70 } else if (cpu_arch == "arm") { | |
71 sources += gypi_values.openssl_arm_sources | |
72 sources -= gypi_values.openssl_arm_source_excludes | |
73 defines += gypi_values.openssl_arm_defines | |
74 } else if (cpu_arch == "mips") { | |
75 sources += gypi_values.openssl_mips_sources | |
76 sources -= gypi_values.openssl_mips_source_excludes | |
77 defines += gypi_values.openssl_mips_defines | |
78 } | |
79 | |
80 if (is_clang) { | |
81 cflags += [ | |
tfarina
2014/04/12 02:40:36
../../third_party/openssl/openssl/crypto/ec/ec_lib
brettw
2014/04/12 04:41:49
Which platform are you compiling on? It worked for
tfarina
2014/04/12 04:48:13
Try building with clang, it works with gcc though.
| |
82 # OpenSSL has a few |if ((foo == NULL))| checks. | |
83 "-Wno-parentheses-equality", | |
84 # OpenSSL uses several function-style macros and then ignores the | |
85 # returned value. | |
86 "-Wno-unused-value", | |
87 ] | |
88 } else { | |
89 cflags += [ | |
90 "-Wno-unused-variable", | |
91 ] | |
92 } | |
4 } | 93 } |
OLD | NEW |