OLD | NEW |
(Empty) | |
| 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 BoringSSL. |
| 6 config("openssl_config") { |
| 7 include_dirs = [] |
| 8 include_dirs += [ "src/include" ] |
| 9 } |
| 10 |
| 11 # Config internal to this build file. |
| 12 config("openssl_internal_config") { |
| 13 visibility = ":*" # Only targets in this file can depend on this. |
| 14 } |
| 15 |
| 16 # The list of BoringSSL files is kept in boringssl.gypi. |
| 17 gypi_values = exec_script( |
| 18 "//build/gypi_to_gn.py", |
| 19 [ rebase_path("//third_party/boringssl/boringssl.gypi") ], |
| 20 "scope", |
| 21 [ "//third_party/boringssl/boringssl.gypi" ]) |
| 22 |
| 23 component("boringssl") { |
| 24 sources = gypi_values.boringssl_lib_sources |
| 25 |
| 26 direct_dependent_configs = [ ":openssl_config" ] |
| 27 |
| 28 cflags = [] |
| 29 |
| 30 configs -= [ "//build/config/compiler:chromium_code" ] |
| 31 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 32 |
| 33 # Also gets the include dirs from :openssl_config |
| 34 include_dirs = [ |
| 35 "src/include", |
| 36 # This is for arm_arch.h, which is needed by some asm files. Since the |
| 37 # asm files are generated and kept in a different directory, they |
| 38 # cannot use relative paths to find this file. |
| 39 "src/crypto", |
| 40 ] |
| 41 |
| 42 if (cpu_arch == "x64") { |
| 43 if (is_mac) { |
| 44 sources += gypi_values.boringssl_mac_x86_64_sources |
| 45 } else if (is_linux || is_android) { |
| 46 sources += gypi_values.boringssl_linux_x86_64_sources |
| 47 } else if (is_win) { |
| 48 sources += gypi_values.boringssl_win_x86_64_sources |
| 49 } else { |
| 50 defines += [ "OPENSSL_NO_ASM" ] |
| 51 } |
| 52 } else if (cpu_arch == "x86") { |
| 53 if (is_mac) { |
| 54 sources += gypi_values.boringssl_mac_x86_sources |
| 55 } else if (is_linux || is_android) { |
| 56 sources += gypi_values.boringssl_linux_x86_sources |
| 57 } else { |
| 58 defines += [ "OPENSSL_NO_ASM" ] |
| 59 } |
| 60 } else if (cpu_arch == "arm") { |
| 61 sources += gypi_values.boringssl_linux_arm_sources |
| 62 } else { |
| 63 defines += [ "OPENSSL_NO_ASM" ] |
| 64 } |
| 65 } |
OLD | NEW |