| 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) { | 9 if (is_component_build) { |
| 10 defines = [ | 10 defines = [ |
| 11 "BORINGSSL_SHARED_LIBRARY", | 11 "BORINGSSL_SHARED_LIBRARY", |
| 12 ] | 12 ] |
| 13 } | 13 } |
| 14 } | 14 } |
| 15 | 15 |
| 16 # Config internal to this build file. | 16 # Config internal to this build file. |
| 17 config("openssl_internal_config") { | 17 config("openssl_internal_config") { |
| 18 visibility = [ ":*" ] # Only targets in this file can depend on this. | 18 visibility = [ ":*" ] # Only targets in this file can depend on this. |
| 19 } | 19 } |
| 20 | 20 |
| 21 # The list of BoringSSL files is kept in boringssl.gypi. | 21 # The list of BoringSSL files is kept in boringssl.gypi. |
| 22 gypi_values = exec_script( | 22 gypi_values = exec_script( |
| 23 "//build/gypi_to_gn.py", | 23 "//build/gypi_to_gn.py", |
| 24 [ rebase_path("//third_party/boringssl/boringssl.gypi") ], | 24 [ rebase_path("//third_party/boringssl/boringssl.gypi") ], |
| 25 "scope", | 25 "scope", |
| 26 [ "//third_party/boringssl/boringssl.gypi" ]) | 26 [ "//third_party/boringssl/boringssl.gypi" ]) |
| 27 | 27 |
| 28 # Win32's assembly is built by Yasm. The other ports use the platform assembler. |
| 29 if (cpu_arch == "x86" && is_win) { |
| 30 import("//third_party/yasm/yasm_assemble.gni") |
| 31 yasm_assemble("boringssl_asm") { |
| 32 sources = gypi_values.boringssl_win_x86_sources |
| 33 } |
| 34 } |
| 35 |
| 28 component("boringssl") { | 36 component("boringssl") { |
| 29 sources = gypi_values.boringssl_lib_sources | 37 sources = gypi_values.boringssl_lib_sources |
| 30 | 38 |
| 31 public_configs = [ ":openssl_config" ] | 39 public_configs = [ ":openssl_config" ] |
| 32 | 40 |
| 33 cflags = [] | 41 cflags = [] |
| 34 defines = [ | 42 defines = [ |
| 35 "BORINGSSL_IMPLEMENTATION", | 43 "BORINGSSL_IMPLEMENTATION", |
| 36 "BORINGSSL_NO_STATIC_INITIALIZER", | 44 "BORINGSSL_NO_STATIC_INITIALIZER", |
| 37 ] | 45 ] |
| (...skipping 23 matching lines...) Expand all Loading... |
| 61 } else if (is_win) { | 69 } else if (is_win) { |
| 62 sources += gypi_values.boringssl_win_x86_64_sources | 70 sources += gypi_values.boringssl_win_x86_64_sources |
| 63 } else { | 71 } else { |
| 64 defines += [ "OPENSSL_NO_ASM" ] | 72 defines += [ "OPENSSL_NO_ASM" ] |
| 65 } | 73 } |
| 66 } else if (cpu_arch == "x86") { | 74 } else if (cpu_arch == "x86") { |
| 67 if (is_mac) { | 75 if (is_mac) { |
| 68 sources += gypi_values.boringssl_mac_x86_sources | 76 sources += gypi_values.boringssl_mac_x86_sources |
| 69 } else if (is_linux || is_android) { | 77 } else if (is_linux || is_android) { |
| 70 sources += gypi_values.boringssl_linux_x86_sources | 78 sources += gypi_values.boringssl_linux_x86_sources |
| 79 } else if (is_win) { |
| 80 deps += [ ":boringssl_asm" ] |
| 71 } else { | 81 } else { |
| 72 defines += [ "OPENSSL_NO_ASM" ] | 82 defines += [ "OPENSSL_NO_ASM" ] |
| 73 } | 83 } |
| 74 } else if (cpu_arch == "arm") { | 84 } else if (cpu_arch == "arm") { |
| 75 sources += gypi_values.boringssl_linux_arm_sources | 85 sources += gypi_values.boringssl_linux_arm_sources |
| 76 } else { | 86 } else { |
| 77 defines += [ "OPENSSL_NO_ASM" ] | 87 defines += [ "OPENSSL_NO_ASM" ] |
| 78 } | 88 } |
| 79 } | 89 } |
| OLD | NEW |