Introduce "dart" dependencies configuration for embedding into Dart VM.

This configuration has the following dependencies layout:

* gtest should be pulled from //third_party/googletest
* zlib from //third_party/zlib
* base from //third_party/mini_chromium/mini_chromium/base
* Windows build configs come from //build/config/win:*.

Bug: crashpad:
Change-Id: I22b44d4f85349383063bf3785a321e3c23d88853
Reviewed-on: https://chromium-review.googlesource.com/c/1291378
Commit-Queue: Vyacheslav Egorov <vegorov@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Vyacheslav Egorov 2018-10-22 19:10:29 +02:00 committed by Commit Bot
parent 2dee96b841
commit bf327d8ceb
5 changed files with 13 additions and 11 deletions

View File

@ -15,14 +15,10 @@
declare_args() {
# Determines various flavors of build configuration, and which concrete
# targets to use for dependencies. Valid values are "standalone", "chromium",
# and "fuchsia".
# "fuchsia", "dart" or "external".
crashpad_dependencies = "standalone"
if (defined(is_fuchsia_tree) && is_fuchsia_tree) {
# Determines various flavors of build configuration, and which concrete
# targets to use for dependencies. Valid values are "standalone",
# "chromium", and "fuchsia". Defaulted to "fuchsia" because
# "is_fuchsia_tree" is set.
crashpad_dependencies = "fuchsia"
}
}
@ -30,10 +26,12 @@ declare_args() {
assert(crashpad_dependencies == "chromium" ||
crashpad_dependencies == "fuchsia" ||
crashpad_dependencies == "standalone" ||
crashpad_dependencies == "external")
crashpad_dependencies == "external" ||
crashpad_dependencies == "dart")
crashpad_is_in_chromium = crashpad_dependencies == "chromium"
crashpad_is_in_fuchsia = crashpad_dependencies == "fuchsia"
crashpad_is_in_dart = crashpad_dependencies == "dart"
crashpad_is_external = crashpad_dependencies == "external"
crashpad_is_standalone = crashpad_dependencies == "standalone"
@ -48,8 +46,8 @@ if (crashpad_is_in_chromium) {
crashpad_is_clang = is_clang
} else {
# External builds assume crashpad and mini_chromium are peers.
if (crashpad_is_external) {
# External and Dart SDK builds assume crashpad and mini_chromium are peers.
if (crashpad_is_external || crashpad_is_in_dart) {
import("../../../mini_chromium/mini_chromium/build/compiler.gni")
import("../../../mini_chromium/mini_chromium/build/platform.gni")
} else {

View File

@ -154,7 +154,7 @@ crashpad_executable("crashpad_handler") {
}
if (crashpad_is_win) {
if (crashpad_is_in_chromium) {
if (crashpad_is_in_chromium || crashpad_is_in_dart) {
remove_configs = [ "//build/config/win:console" ]
configs = [ "//build/config/win:windowed" ]
} else {

View File

@ -28,7 +28,7 @@ if (crashpad_is_in_chromium) {
"//testing/gmock",
]
}
} else if (crashpad_is_in_fuchsia) {
} else if (crashpad_is_in_dart || crashpad_is_in_fuchsia) {
group("gtest") {
testonly = true
public_deps = [

View File

@ -23,6 +23,10 @@ group("base") {
public_deps = [
"mini_chromium/base",
]
} else if (crashpad_is_in_dart) {
public_deps = [
"//third_party/mini_chromium/mini_chromium/base"
]
}
}

View File

@ -14,7 +14,7 @@
import("../../build/crashpad_buildconfig.gni")
if (crashpad_is_in_chromium || crashpad_is_in_fuchsia) {
if (crashpad_is_in_chromium || crashpad_is_in_fuchsia || crashpad_is_in_dart) {
zlib_source = "external"
} else if (!crashpad_is_win && !crashpad_is_fuchsia) {
zlib_source = "system"