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

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

Issue 1139263002: Build BoringSSL without assembly if using MSan. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « DEPS ('k') | third_party/boringssl/boringssl.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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" ]
11 } 11 }
12 } 12 }
13 13
14 # Config internal to this build file. 14 # Config internal to this build file.
15 config("openssl_internal_config") { 15 config("openssl_internal_config") {
16 visibility = [ ":*" ] # Only targets in this file can depend on this. 16 visibility = [ ":*" ] # Only targets in this file can depend on this.
17 } 17 }
18 18
19 # The list of BoringSSL files is kept in boringssl.gypi. 19 # The list of BoringSSL files is kept in boringssl.gypi.
20 gypi_values = 20 gypi_values =
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 && !is_msan) {
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 (current_cpu == "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 (current_cpu == "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
(...skipping 24 matching lines...) Expand all
63 # Also gets the include dirs from :openssl_config 63 # Also gets the include dirs from :openssl_config
64 include_dirs = [ 64 include_dirs = [
65 "src/include", 65 "src/include",
66 66
67 # 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
68 # asm files are generated and kept in a different directory, they 68 # asm files are generated and kept in a different directory, they
69 # cannot use relative paths to find this file. 69 # cannot use relative paths to find this file.
70 "src/crypto", 70 "src/crypto",
71 ] 71 ]
72 72
73 if (current_cpu == "x64") { 73 if (is_msan) {
74 defines += [ "OPENSSL_NO_ASM" ]
75 } else if (current_cpu == "x64") {
74 if (is_mac || is_ios) { 76 if (is_mac || is_ios) {
75 sources += gypi_values.boringssl_mac_x86_64_sources 77 sources += gypi_values.boringssl_mac_x86_64_sources
76 } else if (is_linux || is_android) { 78 } else if (is_linux || is_android) {
77 sources += gypi_values.boringssl_linux_x86_64_sources 79 sources += gypi_values.boringssl_linux_x86_64_sources
78 } else if (is_win) { 80 } else if (is_win) {
79 deps += [ ":boringssl_asm" ] 81 deps += [ ":boringssl_asm" ]
80 } else { 82 } else {
81 defines += [ "OPENSSL_NO_ASM" ] 83 defines += [ "OPENSSL_NO_ASM" ]
82 } 84 }
83 } else if (current_cpu == "x86") { 85 } else if (current_cpu == "x86") {
84 if (is_mac || is_ios) { 86 if (is_mac || is_ios) {
85 sources += gypi_values.boringssl_mac_x86_sources 87 sources += gypi_values.boringssl_mac_x86_sources
86 } else if (is_linux || is_android) { 88 } else if (is_linux || is_android) {
87 sources += gypi_values.boringssl_linux_x86_sources 89 sources += gypi_values.boringssl_linux_x86_sources
88 } else if (is_win) { 90 } else if (is_win) {
89 deps += [ ":boringssl_asm" ] 91 deps += [ ":boringssl_asm" ]
90 } else { 92 } else {
91 defines += [ "OPENSSL_NO_ASM" ] 93 defines += [ "OPENSSL_NO_ASM" ]
92 } 94 }
93 } else if (current_cpu == "arm" && (is_linux || is_android)) { 95 } else if (current_cpu == "arm" && (is_linux || is_android)) {
94 sources += gypi_values.boringssl_linux_arm_sources 96 sources += gypi_values.boringssl_linux_arm_sources
95 } else if (current_cpu == "arm64" && (is_linux || is_android)) { 97 } else if (current_cpu == "arm64" && (is_linux || is_android)) {
96 sources += gypi_values.boringssl_linux_aarch64_sources 98 sources += gypi_values.boringssl_linux_aarch64_sources
97 } else { 99 } else {
98 defines += [ "OPENSSL_NO_ASM" ] 100 defines += [ "OPENSSL_NO_ASM" ]
99 } 101 }
100 } 102 }
OLDNEW
« no previous file with comments | « DEPS ('k') | third_party/boringssl/boringssl.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698