OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 for us and everybody else depending on BoringSSL. | 5 # Config for us and everybody else depending on BoringSSL. |
6 config("openssl_config") { | 6 config("openssl_config") { |
7 include_dirs = [] | 7 include_dirs = [] |
8 include_dirs += [ "src/include" ] | 8 include_dirs += [ "src/include" ] |
| 9 if (is_component_build) { |
| 10 defines += [ |
| 11 "BORINGSSL_SHARED_LIBRARY", |
| 12 ] |
| 13 } |
9 } | 14 } |
10 | 15 |
11 # Config internal to this build file. | 16 # Config internal to this build file. |
12 config("openssl_internal_config") { | 17 config("openssl_internal_config") { |
13 visibility = ":*" # Only targets in this file can depend on this. | 18 visibility = ":*" # Only targets in this file can depend on this. |
14 } | 19 } |
15 | 20 |
16 # The list of BoringSSL files is kept in boringssl.gypi. | 21 # The list of BoringSSL files is kept in boringssl.gypi. |
17 gypi_values = exec_script( | 22 gypi_values = exec_script( |
18 "//build/gypi_to_gn.py", | 23 "//build/gypi_to_gn.py", |
19 [ rebase_path("//third_party/boringssl/boringssl.gypi") ], | 24 [ rebase_path("//third_party/boringssl/boringssl.gypi") ], |
20 "scope", | 25 "scope", |
21 [ "//third_party/boringssl/boringssl.gypi" ]) | 26 [ "//third_party/boringssl/boringssl.gypi" ]) |
22 | 27 |
23 component("boringssl") { | 28 component("boringssl") { |
24 sources = gypi_values.boringssl_lib_sources | 29 sources = gypi_values.boringssl_lib_sources |
25 | 30 |
26 direct_dependent_configs = [ ":openssl_config" ] | 31 direct_dependent_configs = [ ":openssl_config" ] |
27 | 32 |
28 cflags = [] | 33 cflags = [] |
29 defines = [] | 34 defines = [ "BORINGSSL_IMPLEMENTATION" ] |
| 35 if (is_component_build) { |
| 36 defines += [ |
| 37 "BORINGSSL_SHARED_LIBRARY", |
| 38 ] |
| 39 } |
30 | 40 |
31 configs -= [ "//build/config/compiler:chromium_code" ] | 41 configs -= [ "//build/config/compiler:chromium_code" ] |
32 configs += [ "//build/config/compiler:no_chromium_code" ] | 42 configs += [ "//build/config/compiler:no_chromium_code" ] |
33 | 43 |
34 # Also gets the include dirs from :openssl_config | 44 # Also gets the include dirs from :openssl_config |
35 include_dirs = [ | 45 include_dirs = [ |
36 "src/include", | 46 "src/include", |
37 # This is for arm_arch.h, which is needed by some asm files. Since the | 47 # This is for arm_arch.h, which is needed by some asm files. Since the |
38 # asm files are generated and kept in a different directory, they | 48 # asm files are generated and kept in a different directory, they |
39 # cannot use relative paths to find this file. | 49 # cannot use relative paths to find this file. |
(...skipping 16 matching lines...) Expand all Loading... |
56 } else if (is_linux || is_android) { | 66 } else if (is_linux || is_android) { |
57 sources += gypi_values.boringssl_linux_x86_sources | 67 sources += gypi_values.boringssl_linux_x86_sources |
58 } else { | 68 } else { |
59 defines += [ "OPENSSL_NO_ASM" ] | 69 defines += [ "OPENSSL_NO_ASM" ] |
60 } | 70 } |
61 } else if (cpu_arch == "arm") { | 71 } else if (cpu_arch == "arm") { |
62 sources += gypi_values.boringssl_linux_arm_sources | 72 sources += gypi_values.boringssl_linux_arm_sources |
63 } else { | 73 } else { |
64 defines += [ "OPENSSL_NO_ASM" ] | 74 defines += [ "OPENSSL_NO_ASM" ] |
65 } | 75 } |
66 | |
67 if (is_component_build) { | |
68 if (!is_win) { | |
69 configs -= [ "//build/config/gcc:symbol_visibility_hidden" ] | |
70 } | |
71 if (is_posix && !is_mac) { | |
72 # Avoid link failures on Linux x86-64. | |
73 # See http://rt.openssl.org/Ticket/Display.html?id=2466&user=guest&pass=gu
est | |
74 ldflags = [ "-Wl,-Bsymbolic" ] | |
75 } | |
76 } | |
77 } | 76 } |
OLD | NEW |