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

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

Issue 706203003: Update from https://crrev.com/303153 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 = [ 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. 28 # Windows' assembly is built with Yasm. The other platforms use the platform
29 if (cpu_arch == "x86" && is_win) { 29 # assembler.
30 if (is_win) {
30 import("//third_party/yasm/yasm_assemble.gni") 31 import("//third_party/yasm/yasm_assemble.gni")
31 yasm_assemble("boringssl_asm") { 32 yasm_assemble("boringssl_asm") {
32 sources = gypi_values.boringssl_win_x86_sources 33 if (cpu_arch == "x64") {
34 sources = gypi_values.boringssl_win_x86_64_sources
35 } else if (cpu_arch == "x86") {
36 sources = gypi_values.boringssl_win_x86_sources
37 }
33 } 38 }
34 } 39 }
35 40
36 component("boringssl") { 41 component("boringssl") {
37 sources = gypi_values.boringssl_lib_sources 42 sources = gypi_values.boringssl_lib_sources
38 43
39 public_configs = [ ":openssl_config" ] 44 public_configs = [ ":openssl_config" ]
40 45
41 cflags = [] 46 cflags = []
42 defines = [ 47 defines = [
(...skipping 11 matching lines...) Expand all
54 59
55 # Also gets the include dirs from :openssl_config 60 # Also gets the include dirs from :openssl_config
56 include_dirs = [ 61 include_dirs = [
57 "src/include", 62 "src/include",
58 # This is for arm_arch.h, which is needed by some asm files. Since the 63 # This is for arm_arch.h, which is needed by some asm files. Since the
59 # asm files are generated and kept in a different directory, they 64 # asm files are generated and kept in a different directory, they
60 # cannot use relative paths to find this file. 65 # cannot use relative paths to find this file.
61 "src/crypto", 66 "src/crypto",
62 ] 67 ]
63 68
69 if (is_win) {
70 # TODO(davidben): Fix size_t truncations in BoringSSL.
71 # https://crbug.com/429039
72 cflags += [ "/wd4267"]
73 }
74
64 if (cpu_arch == "x64") { 75 if (cpu_arch == "x64") {
65 if (is_mac) { 76 if (is_mac) {
66 sources += gypi_values.boringssl_mac_x86_64_sources 77 sources += gypi_values.boringssl_mac_x86_64_sources
67 } else if (is_linux || is_android) { 78 } else if (is_linux || is_android) {
68 sources += gypi_values.boringssl_linux_x86_64_sources 79 sources += gypi_values.boringssl_linux_x86_64_sources
69 } else if (is_win) { 80 } else if (is_win) {
70 sources += gypi_values.boringssl_win_x86_64_sources 81 deps += [ ":boringssl_asm" ]
71 } else { 82 } else {
72 defines += [ "OPENSSL_NO_ASM" ] 83 defines += [ "OPENSSL_NO_ASM" ]
73 } 84 }
74 } else if (cpu_arch == "x86") { 85 } else if (cpu_arch == "x86") {
75 if (is_mac) { 86 if (is_mac) {
76 sources += gypi_values.boringssl_mac_x86_sources 87 sources += gypi_values.boringssl_mac_x86_sources
77 } else if (is_linux || is_android) { 88 } else if (is_linux || is_android) {
78 sources += gypi_values.boringssl_linux_x86_sources 89 sources += gypi_values.boringssl_linux_x86_sources
79 } else if (is_win) { 90 } else if (is_win) {
80 deps += [ ":boringssl_asm" ] 91 deps += [ ":boringssl_asm" ]
81 } else { 92 } else {
82 defines += [ "OPENSSL_NO_ASM" ] 93 defines += [ "OPENSSL_NO_ASM" ]
83 } 94 }
84 } else if (cpu_arch == "arm") { 95 } else if (cpu_arch == "arm") {
85 sources += gypi_values.boringssl_linux_arm_sources 96 sources += gypi_values.boringssl_linux_arm_sources
86 } else { 97 } else {
87 defines += [ "OPENSSL_NO_ASM" ] 98 defines += [ "OPENSSL_NO_ASM" ]
88 } 99 }
89 } 100 }
OLDNEW
« no previous file with comments | « testing/chromoting/chromoting_integration_tests.isolate ('k') | third_party/boringssl/boringssl.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698