Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: third_party/boringssl/BUILD.gn

Issue 1846343002: Enable BoringSSL for Android in GN build (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/bin/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
zra 2016/04/01 22:06:26 This is from the chromium tree with stuff for test
5 import("//build/config/android/config.gni")
6 import("//build/config/sanitizers/sanitizers.gni")
7
8 # Config for us and everybody else depending on BoringSSL.
9 config("external_config") {
10 include_dirs = [ "src/include" ]
11 if (is_component_build) {
12 defines = [ "BORINGSSL_SHARED_LIBRARY" ]
13 }
14 }
15
16
17 # Config internal to this build file, shared by boringssl and boringssl_fuzzer.
18 config("internal_config") {
19 visibility = [ ":*" ] # Only targets in this file can depend on this.
20 defines = [
21 "BORINGSSL_IMPLEMENTATION",
22 "BORINGSSL_NO_STATIC_INITIALIZER",
23 "OPENSSL_SMALL_FOOTPRINT",
24 ]
25 }
26
27
28 config("no_asm_config") {
29 visibility = [ ":*" ] # Only targets in this file can depend on this.
30 defines = [ "OPENSSL_NO_ASM" ]
31 }
32
33
34 # The list of BoringSSL files is kept in boringssl.gypi.
35 gypi_values =
36 exec_script("../../tools/gypi_to_gn.py",
37 [ rebase_path("boringssl.gypi") ],
38 "scope",
39 [ "boringssl.gypi" ])
40 boringssl_sources =
41 gypi_values.boringssl_crypto_sources + gypi_values.boringssl_ssl_sources
42
43
44 source_set("boringssl_asm") {
45 visibility = [ ":*" ] # Only targets in this file can depend on this.
46 sources = []
47 #asmflags = []
48 include_dirs = [
49 "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 ]
55
56 if (current_cpu == "x64") {
57 if (is_ios) {
58 defines += [ "OPENSSL_NO_ASM" ]
59 } else if (is_mac) {
60 sources += gypi_values.boringssl_mac_x86_64_sources
61 } else if (is_linux || is_android) {
62 sources += gypi_values.boringssl_linux_x86_64_sources
63 } else {
64 public_configs = [ ":no_asm_config" ]
65 }
66 } else if (current_cpu == "x86") {
67 if (is_ios) {
68 defines += [ "OPENSSL_NO_ASM" ]
69 } else if (is_mac) {
70 sources += gypi_values.boringssl_mac_x86_sources
71 } else if (is_linux || is_android) {
72 sources += gypi_values.boringssl_linux_x86_sources
73 } else {
74 public_configs = [ ":no_asm_config" ]
75 }
76 } else if (current_cpu == "arm" && (is_linux || is_android)) {
77 sources += gypi_values.boringssl_linux_arm_sources
78 } else if (current_cpu == "arm64" && (is_linux || is_android)) {
79 sources += gypi_values.boringssl_linux_aarch64_sources
80 } else {
81 public_configs = [ ":no_asm_config" ]
82 }
83 }
84
85
86 component("boringssl") {
87 sources = boringssl_sources
88 deps = [
89 ":boringssl_asm",
90 ]
91 public_configs = [ ":external_config" ]
92 configs += [ ":internal_config" ]
93 configs -= [ "//build/config/compiler:chromium_code" ]
94 configs += [ "//build/config/compiler:no_chromium_code" ]
95 }
OLDNEW
« no previous file with comments | « runtime/bin/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698