aboutsummaryrefslogtreecommitdiff
path: root/third_party/boringssl
diff options
context:
space:
mode:
authorbtolsch <btolsch@chromium.org>2019-04-25 15:58:07 -0700
committerCommit Bot <commit-bot@chromium.org>2019-04-26 00:10:32 +0000
commit4666ed256255c55674212707306c6b5c6fdb63ce (patch)
tree414a46df06aebd6822876c677f7b6c72d8f635e4 /third_party/boringssl
parent8d10582f9ced25a6bb07d2677d573720283aa558 (diff)
downloadopenscreen-4666ed256255c55674212707306c6b5c6fdb63ce.tar.gz
Fix chromium compile erosion
This change makes a few more incremental changes to keep Chromium compilation compatibility so we can try to land the compilation upstream. Bug: 951615 Change-Id: I69fc9f074268657c4fbef46c57775d9b985cc8e6 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/1580361 Reviewed-by: Ryan Keane <rwkeane@google.com> Reviewed-by: mark a. foltz <mfoltz@chromium.org> Commit-Queue: Brandon Tolsch <btolsch@chromium.org>
Diffstat (limited to 'third_party/boringssl')
-rw-r--r--third_party/boringssl/BUILD.gn115
1 files changed, 62 insertions, 53 deletions
diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn
index b6935a9d..5c2d5ae8 100644
--- a/third_party/boringssl/BUILD.gn
+++ b/third_party/boringssl/BUILD.gn
@@ -6,70 +6,79 @@ import("//build_overrides/build.gni")
import("BUILD.generated.gni")
import("BUILD.generated_tests.gni")
-# Config for us and everybody else depending on BoringSSL.
-config("external_config") {
- include_dirs = [ "src/include" ]
-}
+if (build_with_chromium) {
+ group("boringssl") {
+ public_configs = [ "//build/config/compiler:default_include_dirs" ]
+ public_deps = [
+ "//third_party/boringssl",
+ ]
+ }
+} else {
+ # Config for us and everybody else depending on BoringSSL.
+ config("external_config") {
+ include_dirs = [ "src/include" ]
+ }
-# Config internal to this build file, shared by boringssl and boringssl_fuzzer.
-config("internal_config") {
- visibility = [ ":*" ] # Only targets in this file can depend on this.
- defines = [
- "BORINGSSL_ALLOW_CXX_RUNTIME",
- "BORINGSSL_IMPLEMENTATION",
- "BORINGSSL_NO_STATIC_INITIALIZER",
- "OPENSSL_SMALL",
- ]
- cflags_c = [ "-std=c99" ]
- defines += [ "_XOPEN_SOURCE=700" ]
-}
+ # Config internal to this build file, shared by boringssl and boringssl_fuzzer.
+ config("internal_config") {
+ visibility = [ ":*" ] # Only targets in this file can depend on this.
+ defines = [
+ "BORINGSSL_ALLOW_CXX_RUNTIME",
+ "BORINGSSL_IMPLEMENTATION",
+ "BORINGSSL_NO_STATIC_INITIALIZER",
+ "OPENSSL_SMALL",
+ ]
+ cflags_c = [ "-std=c99" ]
+ defines += [ "_XOPEN_SOURCE=700" ]
+ }
-config("no_asm_config") {
- visibility = [ ":*" ] # Only targets in this file can depend on this.
- defines = [ "OPENSSL_NO_ASM" ]
-}
+ config("no_asm_config") {
+ visibility = [ ":*" ] # Only targets in this file can depend on this.
+ defines = [ "OPENSSL_NO_ASM" ]
+ }
-all_sources = crypto_sources + ssl_sources
-all_headers = crypto_headers + ssl_headers
+ all_sources = crypto_sources + ssl_sources
+ all_headers = crypto_headers + ssl_headers
-# This has no sources on some platforms so must be a source_set.
-source_set("boringssl_asm") {
- visibility = [ ":*" ] # Only targets in this file can depend on this.
+ # This has no sources on some platforms so must be a source_set.
+ source_set("boringssl_asm") {
+ visibility = [ ":*" ] # Only targets in this file can depend on this.
- sources = []
- asmflags = []
+ sources = []
+ asmflags = []
- if (is_linux) {
- if (current_cpu == "x64") {
- sources += crypto_sources_linux_x86_64
- } else if (current_cpu == "x86") {
- sources += crypto_sources_linux_x86
- } else {
- public_configs = [ ":no_asm_config" ]
- }
- } else if (is_mac) {
- if (current_cpu == "x64") {
- sources += crypto_sources_mac_x86_64
- } else if (current_cpu == "x86") {
- sources += crypto_sources_mac_x86
+ if (is_linux) {
+ if (current_cpu == "x64") {
+ sources += crypto_sources_linux_x86_64
+ } else if (current_cpu == "x86") {
+ sources += crypto_sources_linux_x86
+ } else {
+ public_configs = [ ":no_asm_config" ]
+ }
+ } else if (is_mac) {
+ if (current_cpu == "x64") {
+ sources += crypto_sources_mac_x86_64
+ } else if (current_cpu == "x86") {
+ sources += crypto_sources_mac_x86
+ } else {
+ public_configs = [ ":no_asm_config" ]
+ }
} else {
public_configs = [ ":no_asm_config" ]
}
- } else {
- public_configs = [ ":no_asm_config" ]
}
-}
-source_set("boringssl") {
- sources = all_sources
- public = all_headers
- deps = [
- ":boringssl_asm",
- "src/third_party/fiat:fiat_license",
- ]
+ source_set("boringssl") {
+ sources = all_sources
+ public = all_headers
+ deps = [
+ ":boringssl_asm",
+ "src/third_party/fiat:fiat_license",
+ ]
- public_configs = [ ":external_config" ]
- configs += [ ":internal_config" ]
+ public_configs = [ ":external_config" ]
+ configs += [ ":internal_config" ]
- configs -= [ "//build:default_include_dirs" ]
+ configs -= [ "//build:default_include_dirs" ]
+ }
}