From 43eac93aef642cd5ae24ac4daba6e8fe454566a8 Mon Sep 17 00:00:00 2001 From: Jay Zhuang Date: Thu, 5 Jan 2023 19:30:37 +0800 Subject: [PATCH] [fuchsia] Import buildconfig from fuchsia ... when build is targeting Fuchsia Change-Id: I03fab9368bd5e8687899a2efeb51736707bce81e Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4137733 Commit-Queue: Jay Zhuang Reviewed-by: Francois Rousseau --- build/crashpad_buildconfig.gni | 6 ++++-- third_party/mini_chromium/BUILD.gn | 7 +++---- util/BUILD.gn | 3 ++- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/build/crashpad_buildconfig.gni b/build/crashpad_buildconfig.gni index eeb56dc3..3de3f8db 100644 --- a/build/crashpad_buildconfig.gni +++ b/build/crashpad_buildconfig.gni @@ -37,7 +37,9 @@ crashpad_is_standalone = crashpad_dependencies == "standalone" # This is the parent directory that contains the mini_chromium source dir. # This variable is not used when crashpad_is_in_chromium. if (crashpad_is_in_fuchsia) { - mini_chromium_source_parent = "//third_party/crashpad/src/third_party/mini_chromium" + import("//third_party/crashpad/fuchsia_buildconfig.gni") + mini_chromium_source_parent = + fuchsia_crashpad_root + "/third_party/mini_chromium" } else { mini_chromium_source_parent = "../third_party/mini_chromium" } @@ -49,7 +51,7 @@ _mini_chromium_source_root = "$mini_chromium_source_parent/mini_chromium" if (crashpad_is_external || crashpad_is_in_dart) { mini_chromium_import_root = "../../../$_mini_chromium_source_root" } else if (crashpad_is_in_fuchsia) { - mini_chromium_import_root = "//third_party/mini_chromium/src" + mini_chromium_import_root = fuchsia_mini_chromium_root } else { mini_chromium_import_root = _mini_chromium_source_root } diff --git a/third_party/mini_chromium/BUILD.gn b/third_party/mini_chromium/BUILD.gn index d97e66ec..9d4ff01c 100644 --- a/third_party/mini_chromium/BUILD.gn +++ b/third_party/mini_chromium/BUILD.gn @@ -20,7 +20,7 @@ group("base") { } else if (crashpad_is_standalone) { public_deps = [ "mini_chromium/base" ] } else if (crashpad_is_in_fuchsia) { - public_deps = [ "//third_party/mini_chromium/src/base" ] + public_deps = [ mini_chromium_import_root + "/base" ] } else if (crashpad_is_external) { public_deps = [ "../../../../mini_chromium/mini_chromium/base" ] } else if (crashpad_is_in_dart) { @@ -42,7 +42,7 @@ group("build") { } else if (crashpad_is_standalone) { public_deps = [ "mini_chromium/build" ] } else if (crashpad_is_in_fuchsia) { - public_deps = [ "//third_party/mini_chromium/src/build" ] + public_deps = [ mini_chromium_import_root + "/build" ] } else if (crashpad_is_external) { public_deps = [ "../../../../mini_chromium/mini_chromium/build" ] } else if (crashpad_is_in_dart) { @@ -56,11 +56,10 @@ group("chromeos_buildflags") { } else if (crashpad_is_standalone) { public_deps = [ "mini_chromium/build:chromeos_buildflags" ] } else if (crashpad_is_in_fuchsia) { - public_deps = [ "//third_party/mini_chromium/src/build:chromeos_buildflags" ] + public_deps = [ mini_chromium_import_root + "/build:chromeos_buildflags" ] } else if (crashpad_is_external) { public_deps = [ "../../../../mini_chromium/mini_chromium/build:chromeos_buildflags" ] } else if (crashpad_is_in_dart) { public_deps = [ "//third_party/mini_chromium/mini_chromium/build:chromeos_buildflags" ] } } - diff --git a/util/BUILD.gn b/util/BUILD.gn index 515b1728..efb43936 100644 --- a/util/BUILD.gn +++ b/util/BUILD.gn @@ -562,7 +562,8 @@ crashpad_static_library("util") { # Include generated files starting with "util". if (crashpad_is_in_fuchsia) { - include_dirs = [ "$root_gen_dir/third_party/crashpad/src" ] + include_dirs = + [ "$root_gen_dir/" + rebase_path(fuchsia_crashpad_root, "//") ] } else { include_dirs = [ "$root_gen_dir/third_party/crashpad/crashpad" ] }