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.
5 # Config for us and everybody else depending on BoringSSL.
6 config("openssl_config") {
8 include_dirs += [ "src/include" ]
9 if (is_component_build) {
11 "BORINGSSL_SHARED_LIBRARY",
16 # Config internal to this build file.
17 config("openssl_internal_config") {
18 visibility = [ ":*" ] # Only targets in this file can depend on this.
21 # The list of BoringSSL files is kept in boringssl.gypi.
22 gypi_values = exec_script(
23 "//build/gypi_to_gn.py",
24 [ rebase_path("//third_party/boringssl/boringssl.gypi") ],
26 [ "//third_party/boringssl/boringssl.gypi" ])
28 component("boringssl") {
29 sources = gypi_values.boringssl_lib_sources
31 direct_dependent_configs = [ ":openssl_config" ]
34 defines = [ "BORINGSSL_IMPLEMENTATION" ]
35 if (is_component_build) {
37 "BORINGSSL_SHARED_LIBRARY",
41 configs -= [ "//build/config/compiler:chromium_code" ]
42 configs += [ "//build/config/compiler:no_chromium_code" ]
44 # Also gets the include dirs from :openssl_config
47 # This is for arm_arch.h, which is needed by some asm files. Since the
48 # asm files are generated and kept in a different directory, they
49 # cannot use relative paths to find this file.
53 if (cpu_arch == "x64") {
55 sources += gypi_values.boringssl_mac_x86_64_sources
56 } else if (is_linux || is_android) {
57 sources += gypi_values.boringssl_linux_x86_64_sources
59 sources += gypi_values.boringssl_win_x86_64_sources
61 defines += [ "OPENSSL_NO_ASM" ]
63 } else if (cpu_arch == "x86") {
65 sources += gypi_values.boringssl_mac_x86_sources
66 } else if (is_linux || is_android) {
67 sources += gypi_values.boringssl_linux_x86_sources
69 defines += [ "OPENSSL_NO_ASM" ]
71 } else if (cpu_arch == "arm") {
72 sources += gypi_values.boringssl_linux_arm_sources
74 defines += [ "OPENSSL_NO_ASM" ]