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" ]
35 "BORINGSSL_IMPLEMENTATION",
36 "BORINGSSL_NO_STATIC_INITIALIZER",
38 if (is_component_build) {
40 "BORINGSSL_SHARED_LIBRARY",
44 configs -= [ "//build/config/compiler:chromium_code" ]
45 configs += [ "//build/config/compiler:no_chromium_code" ]
47 # Also gets the include dirs from :openssl_config
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.
56 if (cpu_arch == "x64") {
58 sources += gypi_values.boringssl_mac_x86_64_sources
59 } else if (is_linux || is_android) {
60 sources += gypi_values.boringssl_linux_x86_64_sources
62 sources += gypi_values.boringssl_win_x86_64_sources
64 defines += [ "OPENSSL_NO_ASM" ]
66 } else if (cpu_arch == "x86") {
68 sources += gypi_values.boringssl_mac_x86_sources
69 } else if (is_linux || is_android) {
70 sources += gypi_values.boringssl_linux_x86_sources
72 defines += [ "OPENSSL_NO_ASM" ]
74 } else if (cpu_arch == "arm") {
75 sources += gypi_values.boringssl_linux_arm_sources
77 defines += [ "OPENSSL_NO_ASM" ]