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 import("//build/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
6 import("//build/config/sanitizers/sanitizers.gni") | 6 import("//build/config/sanitizers/sanitizers.gni") |
7 | 7 |
8 # Config for us and everybody else depending on BoringSSL. | 8 # Config for us and everybody else depending on BoringSSL. |
9 config("external_config") { | 9 config("external_config") { |
10 include_dirs = [ "src/include" ] | 10 include_dirs = [ "src/include" ] |
11 if (is_component_build) { | 11 if (is_component_build) { |
12 defines = [ "BORINGSSL_SHARED_LIBRARY" ] | 12 defines = [ "BORINGSSL_SHARED_LIBRARY" ] |
13 } | 13 } |
14 } | 14 } |
15 | 15 |
16 | 16 |
17 # Config internal to this build file, shared by boringssl and boringssl_fuzzer. | 17 # Config internal to this build file, shared by boringssl and boringssl_fuzzer. |
18 config("internal_config") { | 18 config("internal_config") { |
19 visibility = [ ":*" ] # Only targets in this file can depend on this. | 19 visibility = [ ":*" ] # Only targets in this file can depend on this. |
20 defines = [ | 20 defines = [ |
21 "BORINGSSL_IMPLEMENTATION", | 21 "BORINGSSL_IMPLEMENTATION", |
22 "BORINGSSL_NO_STATIC_INITIALIZER", | 22 "BORINGSSL_NO_STATIC_INITIALIZER", |
23 "OPENSSL_SMALL_FOOTPRINT", | 23 "OPENSSL_SMALL", |
24 ] | 24 ] |
25 } | 25 } |
26 | 26 |
27 | 27 |
28 config("no_asm_config") { | 28 config("no_asm_config") { |
29 visibility = [ ":*" ] # Only targets in this file can depend on this. | 29 visibility = [ ":*" ] # Only targets in this file can depend on this. |
30 defines = [ "OPENSSL_NO_ASM" ] | 30 defines = [ "OPENSSL_NO_ASM" ] |
31 } | 31 } |
32 | 32 |
33 | 33 |
34 # The list of BoringSSL files is kept in boringssl.gypi. | 34 # The list of BoringSSL files is kept in boringssl.gypi. |
35 gypi_values = | 35 gypi_values = |
36 exec_script("../../tools/gypi_to_gn.py", | 36 exec_script("../../tools/gypi_to_gn.py", |
37 [ rebase_path("boringssl.gypi") ], | 37 [ rebase_path("boringssl.gypi") ], |
38 "scope", | 38 "scope", |
39 [ "boringssl.gypi" ]) | 39 [ "boringssl.gypi" ]) |
40 boringssl_sources = | 40 boringssl_sources = |
41 gypi_values.boringssl_crypto_sources + gypi_values.boringssl_ssl_sources | 41 gypi_values.boringssl_crypto_sources + gypi_values.boringssl_ssl_sources |
42 | 42 |
43 | 43 |
44 source_set("boringssl_asm") { | 44 source_set("boringssl_asm") { |
45 visibility = [ ":*" ] # Only targets in this file can depend on this. | 45 visibility = [ ":*" ] # Only targets in this file can depend on this. |
46 sources = [] | 46 sources = [] |
47 #asmflags = [] | |
48 include_dirs = [ | 47 include_dirs = [ |
49 "src/include", | 48 "src/include", |
50 # This is for arm_arch.h, which is needed by some asm files. Since the | |
51 # asm files are generated and kept in a different directory, they | |
52 # cannot use relative paths to find this file. | |
53 "src/crypto", | |
54 ] | 49 ] |
55 | 50 |
56 if (current_cpu == "x64") { | 51 if (current_cpu == "x64") { |
57 if (is_ios) { | 52 if (is_ios) { |
58 defines += [ "OPENSSL_NO_ASM" ] | 53 defines += [ "OPENSSL_NO_ASM" ] |
59 } else if (is_mac) { | 54 } else if (is_mac) { |
60 sources += gypi_values.boringssl_mac_x86_64_sources | 55 sources += gypi_values.boringssl_mac_x86_64_sources |
61 } else if (is_linux || is_android) { | 56 } else if (is_linux || is_android) { |
62 sources += gypi_values.boringssl_linux_x86_64_sources | 57 sources += gypi_values.boringssl_linux_x86_64_sources |
63 } else { | 58 } else { |
(...skipping 22 matching lines...) Expand all Loading... |
86 component("boringssl") { | 81 component("boringssl") { |
87 sources = boringssl_sources | 82 sources = boringssl_sources |
88 deps = [ | 83 deps = [ |
89 ":boringssl_asm", | 84 ":boringssl_asm", |
90 ] | 85 ] |
91 public_configs = [ ":external_config" ] | 86 public_configs = [ ":external_config" ] |
92 configs += [ ":internal_config" ] | 87 configs += [ ":internal_config" ] |
93 configs -= [ "//build/config/compiler:chromium_code" ] | 88 configs -= [ "//build/config/compiler:chromium_code" ] |
94 configs += [ "//build/config/compiler:no_chromium_code" ] | 89 configs += [ "//build/config/compiler:no_chromium_code" ] |
95 } | 90 } |
OLD | NEW |