0

Make components/crash/core/app a source_set

This is useful in a follow-up CL to ensure deps are not eliminated from
the components/crash/core/app:app static_library before being linked
into the final object.

On Windows, components/crash/core/app:app includes declarations in
crash_export_thunks.h which must have definitions provided by linking
crash_export_thunks or test_support. This CL corrects missing
definitions of these crash_export_thunks by linking one of those deps
or by removing dependencies on components/crash/core/app:app.

Change-Id: I209c11affe4451aa2ea3afd40e065e402bbd2bb2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3207228
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1354830}
This commit is contained in:
Joshua Peraza
2024-09-12 21:44:09 +00:00
committed by Chromium LUCI CQ
parent 1d4147ba2f
commit 5b0b5b4665
9 changed files with 45 additions and 25 deletions
chrome
common
credential_provider
extension
gaiacp
setup
test
notification_helper
components/crash/core/app
content/shell
headless

@ -265,7 +265,7 @@ static_library("common_lib") {
deps = [
"//build:chromeos_buildflags",
"//components/crash/core/app",
"//components/crash/core/app:switches",
"//components/google/core/common",
"//components/heap_profiling/in_process",
"//components/heap_profiling/in_process:mojom",

@ -93,8 +93,6 @@ executable("gcpw_extension") {
"../gaiacp:policies",
"../gaiacp:util",
"//base",
"//components/crash/core/app:crash_export_thunks",
"//components/crash/core/app:run_as_crashpad_handler",
]
configs += [ "//build/config/win:windowed" ]
}

@ -20,10 +20,6 @@ source_set("common") {
"experiments_fetcher.h",
"experiments_manager.cc",
"experiments_manager.h",
"gcp_crash_reporter_client.cc",
"gcp_crash_reporter_client.h",
"gcp_crash_reporting_utils.cc",
"gcp_crash_reporting_utils.h",
"gem_device_details_manager.cc",
"gem_device_details_manager.h",
]
@ -38,8 +34,6 @@ source_set("common") {
"//build:branding_buildflags",
"//chrome/common:version_header",
"//chrome/installer/launcher_support",
"//components/crash/core/app",
"//components/crash/core/common",
"//components/version_info",
"//google_apis:google_apis",
"//url",
@ -98,6 +92,7 @@ source_set("util") {
"//third_party/re2",
"//url:url",
]
libs = [ "winhttp.lib" ]
}
config("util_config") {
@ -149,6 +144,23 @@ source_set("mdm_utils") {
]
}
source_set("crash") {
sources = [
"gcp_crash_reporter_client.cc",
"gcp_crash_reporter_client.h",
"gcp_crash_reporting_utils.cc",
"gcp_crash_reporting_utils.h",
]
deps = [
":common",
":util",
"//base",
"//build:branding_buildflags",
"//components/crash/core/app",
"//components/crash/core/common",
]
}
# This static library is shared with the test code.
source_set("gaiacp_lib") {
@ -193,6 +205,7 @@ source_set("gaiacp_lib") {
public_configs = [ ":gaiacp_config" ]
public_deps = [ ":common" ]
deps = [
":crash",
":gaia_credential_provider_idl",
":mdm_utils",
":policies",
@ -208,7 +221,6 @@ source_set("gaiacp_lib") {
"//chrome/credential_provider/gaiacp/mojom",
"//chrome/installer/launcher_support",
"//components/crash/core/app:app",
"//components/crash/core/app:crash_export_thunks",
"//components/crash/core/app:run_as_crashpad_handler",
"//content/public/browser",
"//crypto",
@ -294,6 +306,7 @@ shared_library("gaia1_0") {
"//build:branding_buildflags",
"//chrome/common:version_header",
"//components/crash/core/app",
"//components/crash/core/app:crash_export_thunks",
"//components/crash/core/app:run_as_crashpad_handler",
"//content/public/browser",
]

@ -79,6 +79,7 @@ executable("gcp_setup") {
"../eventlog:gcp_eventlog_messages",
"../extension:common",
"../gaiacp:common",
"../gaiacp:crash",
"../gaiacp:util",
"//build:branding_buildflags",
"//chrome/common:version_header",

@ -53,6 +53,7 @@ test("gcp_unittests") {
"//chrome/common:non_code_constants",
"//chrome/common:version_header",
"//chrome/test:credential_provider_test_utils",
"//components/crash/core/app:test_support",
"//content/public/browser",
"//google_apis",
"//net:test_support",

@ -87,6 +87,7 @@ test("notification_helper_unittests") {
"//chrome/install_static/test:test_support",
"//chrome/installer/setup:lib",
"//chrome/installer/util:with_no_strings",
"//components/crash/core/app:test_support",
"//testing/gtest",
]

@ -50,13 +50,19 @@ source_set("crashpad_handler_main") {
}
}
static_library("app") {
source_set("switches") {
sources = [
"crash_switches.cc",
"crash_switches.h",
]
public_deps = [ "//build:chromeos_buildflags" ]
}
source_set("app") {
sources = [
"client_upload_info.cc",
"client_upload_info.h",
"crash_export_thunks.h",
"crash_switches.cc",
"crash_switches.h",
"crashpad.cc",
"crashpad.h",
]
@ -72,7 +78,11 @@ static_library("app") {
defines = [ "CRASH_IMPLEMENTATION" ]
public_deps = [ ":lib" ]
public_deps = [
":lib",
":switches",
]
deps = [
"//base",
"//build:branding_buildflags",
@ -296,6 +306,7 @@ source_set("unit_tests") {
sources = []
deps = [
":lib",
":test_support",
"//base",
"//base/test:test_support",
"//testing/gmock",

@ -376,6 +376,7 @@ static_library("content_shell_lib") {
deps += [
"//components/crash/content/browser",
"//components/crash/core/app",
"//components/crash/core/app:test_support",
]
}

@ -441,7 +441,6 @@ component("headless_non_renderer") {
if (is_component_build) {
deps += [
"//components/crash/core/common",
"//components/security_state/content",
"//gin",
"//third_party/blink/public:blink",
@ -475,7 +474,10 @@ component("headless_non_renderer") {
}
if (is_win) {
deps += [ "//sandbox" ]
deps += [
"//components/crash/core/app:crash_export_thunks",
"//sandbox",
]
}
if (is_linux || is_chromeos) {
@ -568,10 +570,6 @@ test("headless_unittests") {
"//ui/gfx:test_support",
]
if (is_win) {
deps += [ "//components/crash/core/app:crash_export_thunks" ]
}
if (enable_printing) {
deps += [
"//components/printing/browser",
@ -840,10 +838,6 @@ static_library("headless_shell_lib") {
public_deps += [ ":headless_non_renderer" ]
}
if (!is_fuchsia) {
deps += [ "//components/crash/content/browser" ]
}
if (enable_printing) {
deps += [
"//components/printing/browser",
@ -880,7 +874,7 @@ static_library("headless_shell_lib") {
}
if (is_win || (is_posix && !is_mac)) {
deps += [ "//components/crash/core/app" ]
deps += [ "//components/crash/core/app:switches" ]
}
configs += [