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

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

Issue 913373002: Update Chomium's build files to work w/ latest GN binaries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn_cpu_arch_changes
Patch Set: merge to #317214 Created 5 years, 10 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
OLDNEW
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 = [ "BORINGSSL_SHARED_LIBRARY" ] 10 defines = [ "BORINGSSL_SHARED_LIBRARY" ]
(...skipping 10 matching lines...) Expand all
21 exec_script("//build/gypi_to_gn.py", 21 exec_script("//build/gypi_to_gn.py",
22 [ rebase_path("//third_party/boringssl/boringssl.gypi") ], 22 [ rebase_path("//third_party/boringssl/boringssl.gypi") ],
23 "scope", 23 "scope",
24 [ "//third_party/boringssl/boringssl.gypi" ]) 24 [ "//third_party/boringssl/boringssl.gypi" ])
25 25
26 # Windows' assembly is built with Yasm. The other platforms use the platform 26 # Windows' assembly is built with Yasm. The other platforms use the platform
27 # assembler. 27 # assembler.
28 if (is_win) { 28 if (is_win) {
29 import("//third_party/yasm/yasm_assemble.gni") 29 import("//third_party/yasm/yasm_assemble.gni")
30 yasm_assemble("boringssl_asm") { 30 yasm_assemble("boringssl_asm") {
31 if (cpu_arch == "x64") { 31 if (current_cpu == "x64") {
32 sources = gypi_values.boringssl_win_x86_64_sources 32 sources = gypi_values.boringssl_win_x86_64_sources
33 } else if (cpu_arch == "x86") { 33 } else if (current_cpu == "x86") {
34 sources = gypi_values.boringssl_win_x86_sources 34 sources = gypi_values.boringssl_win_x86_sources
35 } 35 }
36 } 36 }
37 } 37 }
38 38
39 component("boringssl") { 39 component("boringssl") {
40 sources = gypi_values.boringssl_lib_sources 40 sources = gypi_values.boringssl_lib_sources
41 41
42 public_configs = [ ":openssl_config" ] 42 public_configs = [ ":openssl_config" ]
43 43
44 cflags = [] 44 cflags = []
45 defines = [ 45 defines = [
46 "BORINGSSL_IMPLEMENTATION", 46 "BORINGSSL_IMPLEMENTATION",
47 "BORINGSSL_NO_STATIC_INITIALIZER", 47 "BORINGSSL_NO_STATIC_INITIALIZER",
48 ] 48 ]
49 deps = [] 49 deps = []
50 if (is_component_build) { 50 if (is_component_build) {
51 defines += [ "BORINGSSL_SHARED_LIBRARY" ] 51 defines += [ "BORINGSSL_SHARED_LIBRARY" ]
52 } 52 }
53 53
54 configs -= [ "//build/config/compiler:chromium_code" ] 54 configs -= [ "//build/config/compiler:chromium_code" ]
55 configs += [ 55 configs += [
56 "//build/config/compiler:no_chromium_code", 56 "//build/config/compiler:no_chromium_code",
57
57 # TODO(davidben): Fix size_t truncations in BoringSSL. 58 # TODO(davidben): Fix size_t truncations in BoringSSL.
58 # https://crbug.com/429039 59 # https://crbug.com/429039
59 "//build/config/compiler:no_size_t_to_int_warning", 60 "//build/config/compiler:no_size_t_to_int_warning",
60 ] 61 ]
61 62
62 # Also gets the include dirs from :openssl_config 63 # Also gets the include dirs from :openssl_config
63 include_dirs = [ 64 include_dirs = [
64 "src/include", 65 "src/include",
65 66
66 # This is for arm_arch.h, which is needed by some asm files. Since the 67 # This is for arm_arch.h, which is needed by some asm files. Since the
67 # asm files are generated and kept in a different directory, they 68 # asm files are generated and kept in a different directory, they
68 # cannot use relative paths to find this file. 69 # cannot use relative paths to find this file.
69 "src/crypto", 70 "src/crypto",
70 ] 71 ]
71 72
72 if (cpu_arch == "x64") { 73 if (current_cpu == "x64") {
73 if (is_mac) { 74 if (is_mac) {
74 sources += gypi_values.boringssl_mac_x86_64_sources 75 sources += gypi_values.boringssl_mac_x86_64_sources
75 } else if (is_linux || is_android) { 76 } else if (is_linux || is_android) {
76 sources += gypi_values.boringssl_linux_x86_64_sources 77 sources += gypi_values.boringssl_linux_x86_64_sources
77 } else if (is_win) { 78 } else if (is_win) {
78 deps += [ ":boringssl_asm" ] 79 deps += [ ":boringssl_asm" ]
79 } else { 80 } else {
80 defines += [ "OPENSSL_NO_ASM" ] 81 defines += [ "OPENSSL_NO_ASM" ]
81 } 82 }
82 } else if (cpu_arch == "x86") { 83 } else if (current_cpu == "x86") {
83 if (is_mac) { 84 if (is_mac) {
84 sources += gypi_values.boringssl_mac_x86_sources 85 sources += gypi_values.boringssl_mac_x86_sources
85 } else if (is_linux || is_android) { 86 } else if (is_linux || is_android) {
86 sources += gypi_values.boringssl_linux_x86_sources 87 sources += gypi_values.boringssl_linux_x86_sources
87 } else if (is_win) { 88 } else if (is_win) {
88 deps += [ ":boringssl_asm" ] 89 deps += [ ":boringssl_asm" ]
89 } else { 90 } else {
90 defines += [ "OPENSSL_NO_ASM" ] 91 defines += [ "OPENSSL_NO_ASM" ]
91 } 92 }
92 } else if (cpu_arch == "arm") { 93 } else if (current_cpu == "arm") {
93 sources += gypi_values.boringssl_linux_arm_sources 94 sources += gypi_values.boringssl_linux_arm_sources
94 } else if (cpu_arch == "arm64") { 95 } else if (current_cpu == "arm64") {
95 sources += gypi_values.boringssl_linux_aarch64_sources 96 sources += gypi_values.boringssl_linux_aarch64_sources
96 } else { 97 } else {
97 defines += [ "OPENSSL_NO_ASM" ] 98 defines += [ "OPENSSL_NO_ASM" ]
98 } 99 }
99 } 100 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698