Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit b866958

Browse files
committed
Reuse existing dart boringssl BUILD.gn
1 parent 760ce30 commit b866958

File tree

3 files changed

+5
-85
lines changed

3 files changed

+5
-85
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ deps = {
300300
'src/flutter/third_party/yapf':
301301
Var('flutter_git') + '/third_party/yapf' + '@' + '212c5b5ad8e172d2d914ae454c121c89cccbcb35',
302302

303-
'src/flutter/third_party/boringssl/src':
303+
'src/flutter/third_party/dart/third_party/boringssl/src':
304304
'https://boringssl.googlesource.com/boringssl.git' + '@' + Var('dart_boringssl_rev'),
305305

306306
'src/flutter/third_party/perfetto':

build/secondary/third_party/boringssl/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
# found in the LICENSE file.
44

55
group("boringssl") {
6-
public_deps = [ "//flutter/third_party/boringssl" ]
6+
public_deps = [ "//flutter/third_party/dart/third_party/boringssl" ]
77
}

third_party/boringssl/BUILD.gn

Lines changed: 3 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -2,92 +2,12 @@
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

5-
import("//build/config/android/config.gni")
6-
import("//build/config/arm.gni")
7-
import("//build/config/compiler/compiler.gni")
8-
import("//build/config/sanitizers/sanitizers.gni")
9-
import("//build_overrides/build.gni")
10-
import("src/gen/sources.gni")
11-
12-
# Config for us and everybody else depending on BoringSSL.
13-
config("external_config") {
14-
include_dirs = [ "src/include" ]
15-
if (is_component_build) {
16-
defines = [ "BORINGSSL_SHARED_LIBRARY" ]
17-
}
18-
}
19-
20-
# The config used by the :boringssl component itself, and the fuzzer copies.
21-
config("component_config") {
22-
visibility = [ ":*" ]
23-
configs = [ ":internal_config" ]
24-
defines = [ "BORINGSSL_IMPLEMENTATION" ]
25-
5+
config("boringssl_config") {
266
cflags_c = [ "-std=c17" ]
277
}
288

29-
# This config is used by anything that consumes internal headers. Tests consume
30-
# this rather than :component_config.
31-
config("internal_config") {
32-
visibility = [ ":*" ]
33-
defines = [
34-
"OPENSSL_SMALL",
35-
"OPENSSL_STATIC_ARMCAP",
36-
]
37-
if (is_posix) {
38-
defines += [ "_XOPEN_SOURCE=700" ]
39-
}
40-
}
41-
42-
config("no_asm_config") {
43-
visibility = [ ":*" ]
44-
defines = [ "OPENSSL_NO_ASM" ]
45-
}
46-
47-
# TODO(crbug.com/42290535): Move Chromium's use of libpki to the public API and
48-
# unexport pki_internal_headers.
49-
all_sources = bcm_internal_headers + bcm_sources + crypto_internal_headers +
50-
crypto_sources + ssl_internal_headers + ssl_sources + pki_sources
51-
all_headers = crypto_headers + ssl_headers + pki_headers + pki_internal_headers
52-
53-
if (is_msan) {
54-
# MSan instrumentation is incompatible with assembly optimizations.
55-
# BoringSSL's GAS-compatible assembly knows how to detect MSan, but the NASM
56-
# assembly does not, so we check for MSan explicitly.
57-
source_set("boringssl_asm") {
58-
visibility = [ ":*" ]
59-
public_configs = [ ":no_asm_config" ]
60-
}
61-
} else if (is_win && (current_cpu == "x86" || current_cpu == "x64")) {
62-
# Windows' x86 and x86_64 assembly is built with NASM.
63-
source_set("boringssl_asm") {
64-
visibility = [ ":*" ]
65-
public_configs = [ ":no_asm_config" ]
66-
}
67-
} else {
68-
# All other targets use GAS-compatible assembler. BoringSSL's assembly files
69-
# are all wrapped in processor checks for the corresponding target, so there
70-
# is no need to add target conditions in the build.
71-
source_set("boringssl_asm") {
72-
visibility = [ ":*" ]
73-
sources = rebase_path(bcm_sources_asm + crypto_sources_asm, ".", "src")
74-
include_dirs = [ "src/include" ]
75-
}
76-
}
77-
789
source_set("boringssl") {
79-
sources = rebase_path(all_sources, ".", "src")
80-
public = rebase_path(all_headers, ".", "src")
81-
82-
if (is_win) {
83-
configs += [ ":no_asm_config" ]
84-
} else {
85-
deps = [ ":boringssl_asm" ]
86-
}
87-
88-
public_configs = [ ":external_config" ]
89-
configs += [ ":component_config" ]
10+
configs += [ ":boringssl_config" ]
9011

91-
configs -= [ "//build/config/compiler:chromium_code" ]
92-
configs += [ "//build/config/compiler:no_chromium_code" ]
12+
deps = [ "//flutter/third_party/dart/third_party/boringssl:boringssl" ]
9313
}

0 commit comments

Comments
 (0)