Make feature target names more explicit

This commit is contained in:
Marshall Greenblatt
2025-01-08 19:06:01 -05:00
parent 7be2558291
commit de5324ef05
10 changed files with 71 additions and 51 deletions

View File

@@ -878,7 +878,7 @@ source_set("libcef_static") {
public_deps = [ public_deps = [
# Bring in feature flag defines. # Bring in feature flag defines.
"//cef/libcef/features", "//cef/libcef/features:buildflags",
# Support relative include paths. # Support relative include paths.
"//base", "//base",
"//third_party/abseil-cpp:absl", "//third_party/abseil-cpp:absl",
@@ -1207,7 +1207,7 @@ if (is_win) {
configs += [ ":libcef_includes_config" ] configs += [ ":libcef_includes_config" ]
deps = [ deps = [
":make_config_header", ":make_config_header",
"libcef/features", "libcef/features:buildflags",
"//sandbox", "//sandbox",
] ]
} }

View File

@@ -25,8 +25,8 @@ import("//cef/libcef/features/features.gni")
# sources = [ ... ] # sources = [ ... ]
# #
# deps = [ # deps = [
# # Always include the CEF features. # # Always include the CEF buildflags.
# "//cef/libcef/features", # "//cef/libcef/features:buildflags",
# ... # ...
# ] # ]
# #
@@ -47,6 +47,9 @@ import("//cef/libcef/features/features.gni")
# #
# # Always include the CEF configuration. # # Always include the CEF configuration.
# configs += [ "//cef/libcef/features:config" ] # configs += [ "//cef/libcef/features:config" ]
#
# # Maybe include other CEF targets.
# deps += [ "//cef/libcef/features:deps" ]
# } # }
# ... # ...
# } # }
@@ -76,7 +79,7 @@ import("//cef/libcef/features/features.gni")
# ... # ...
# #
buildflag_header("features") { buildflag_header("buildflags") {
header = "features.h" header = "features.h"
flags = [ flags = [
@@ -94,10 +97,20 @@ config("config") {
# CEF generated header files that also need to be discoverable. # CEF generated header files that also need to be discoverable.
# These #includes from library-side code will always be prefixed with cef/. # These #includes from library-side code will always be prefixed with cef/.
"$root_build_dir/includes", "$root_out_dir/includes",
# These #includes from cef/include/ directory will not be prefixed.
"$root_out_dir/includes/cef",
] ]
defines = [ defines = [
"BUILDING_CEF_SHARED", "BUILDING_CEF_SHARED",
"USING_CHROMIUM_INCLUDES", "USING_CHROMIUM_INCLUDES",
] ]
} }
group("deps") {
deps = [
# CEF targets that generate header files.
"//cef:make_api_versions_header",
"//cef:make_version_header",
]
}

View File

@@ -1,5 +1,5 @@
diff --git base/BUILD.gn base/BUILD.gn diff --git base/BUILD.gn base/BUILD.gn
index 5d8029ab4b82c..7c31237709944 100644 index 5d8029ab4b82c..3fd3b54866cf7 100644
--- base/BUILD.gn --- base/BUILD.gn
+++ base/BUILD.gn +++ base/BUILD.gn
@@ -42,6 +42,7 @@ import("//build/rust/rust_static_library.gni") @@ -42,6 +42,7 @@ import("//build/rust/rust_static_library.gni")
@@ -10,20 +10,22 @@ index 5d8029ab4b82c..7c31237709944 100644
import("//testing/libfuzzer/fuzzer_test.gni") import("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni") import("//testing/test.gni")
@@ -1491,7 +1492,11 @@ component("base") { @@ -1491,7 +1492,13 @@ component("base") {
"hash/md5_constexpr_internal.h", "hash/md5_constexpr_internal.h",
"hash/sha1.h", "hash/sha1.h",
] ]
- if (is_nacl) { - if (is_nacl) {
+ deps += [ "//cef/libcef/features" ] +
+ deps += [ "//cef/libcef/features:buildflags" ]
+ if (enable_cef) { + if (enable_cef) {
+ configs += [ "//cef/libcef/features:config" ] + configs += [ "//cef/libcef/features:config" ]
+ } + }
+
+ if (is_nacl || is_cef_sandbox_build) { + if (is_nacl || is_cef_sandbox_build) {
sources += [ sources += [
"hash/md5_nacl.cc", "hash/md5_nacl.cc",
"hash/md5_nacl.h", "hash/md5_nacl.h",
@@ -1941,6 +1946,12 @@ component("base") { @@ -1941,6 +1948,12 @@ component("base") {
defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ] defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ]
} }

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
index 968f2f959882a..96c32bd78f9b0 100644 index 968f2f959882a..e96fca4f0e130 100644
--- chrome/browser/BUILD.gn --- chrome/browser/BUILD.gn
+++ chrome/browser/BUILD.gn +++ chrome/browser/BUILD.gn
@@ -12,6 +12,7 @@ import("//build/config/compiler/pgo/pgo.gni") @@ -12,6 +12,7 @@ import("//build/config/compiler/pgo/pgo.gni")
@@ -14,7 +14,7 @@ index 968f2f959882a..96c32bd78f9b0 100644
"//build/config/compiler:compiler_buildflags", "//build/config/compiler:compiler_buildflags",
"//build/config/linux/dbus:buildflags", "//build/config/linux/dbus:buildflags",
"//cc", "//cc",
+ "//cef/libcef/features", + "//cef/libcef/features:buildflags",
"//chrome:extra_resources", "//chrome:extra_resources",
"//chrome:resources", "//chrome:resources",
"//chrome:strings", "//chrome:strings",

View File

@@ -88,7 +88,7 @@ index 964c47b090cb1..1917dc314c3ae 100644
} }
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
index c8b65faa2d65b..687f4cff4ea64 100644 index c8b65faa2d65b..2ec88972acec2 100644
--- chrome/browser/ui/BUILD.gn --- chrome/browser/ui/BUILD.gn
+++ chrome/browser/ui/BUILD.gn +++ chrome/browser/ui/BUILD.gn
@@ -8,6 +8,7 @@ import("//build/config/compiler/compiler.gni") @@ -8,6 +8,7 @@ import("//build/config/compiler/compiler.gni")
@@ -114,7 +114,7 @@ index c8b65faa2d65b..687f4cff4ea64 100644
"//build/config/chromebox_for_meetings:buildflags", "//build/config/chromebox_for_meetings:buildflags",
"//build/config/linux/dbus:buildflags", "//build/config/linux/dbus:buildflags",
"//cc/paint", "//cc/paint",
+ "//cef/libcef/features", + "//cef/libcef/features:buildflags",
"//chrome:resources", "//chrome:resources",
"//chrome:strings", "//chrome:strings",
"//chrome/app:chrome_dll_resources", "//chrome/app:chrome_dll_resources",
@@ -125,7 +125,7 @@ index c8b65faa2d65b..687f4cff4ea64 100644
+ if (enable_cef) { + if (enable_cef) {
+ deps += [ + deps += [
+ "//cef:cef_resources", + "//cef:cef_resources",
+ "//cef:make_version_header", + "//cef/libcef/features:deps",
+ ] + ]
+ } + }
+ +
@@ -141,7 +141,7 @@ index c8b65faa2d65b..687f4cff4ea64 100644
] ]
} }
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
index e0582db3e8e88..1c61a24136933 100644 index e0582db3e8e88..3d7ccab3a9804 100644
--- chrome/browser/ui/browser.cc --- chrome/browser/ui/browser.cc
+++ chrome/browser/ui/browser.cc +++ chrome/browser/ui/browser.cc
@@ -270,6 +270,25 @@ @@ -270,6 +270,25 @@

View File

@@ -1,5 +1,5 @@
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
index 05117bbe71fb1..9b41ae370c3c8 100644 index 05117bbe71fb1..ff809156ee815 100644
--- chrome/renderer/BUILD.gn --- chrome/renderer/BUILD.gn
+++ chrome/renderer/BUILD.gn +++ chrome/renderer/BUILD.gn
@@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
@@ -14,7 +14,7 @@ index 05117bbe71fb1..9b41ae370c3c8 100644
":process_state", ":process_state",
"//base/allocator:buildflags", "//base/allocator:buildflags",
"//build:chromeos_buildflags", "//build:chromeos_buildflags",
+ "//cef/libcef/features", + "//cef/libcef/features:buildflags",
"//chrome:resources", "//chrome:resources",
"//chrome:strings", "//chrome:strings",
"//chrome/common", "//chrome/common",

View File

@@ -198,14 +198,14 @@ index 521d5710b6387..8a5f3e6a312d2 100644
#if BUILDFLAG(IS_CHROMEOS_LACROS) #if BUILDFLAG(IS_CHROMEOS_LACROS)
std::unique_ptr<chromeos::LacrosService> lacros_service_; std::unique_ptr<chromeos::LacrosService> lacros_service_;
diff --git chrome/app_shim/BUILD.gn chrome/app_shim/BUILD.gn diff --git chrome/app_shim/BUILD.gn chrome/app_shim/BUILD.gn
index db17714f74137..23f9f2eb3eb8b 100644 index db17714f74137..7119e5dba649a 100644
--- chrome/app_shim/BUILD.gn --- chrome/app_shim/BUILD.gn
+++ chrome/app_shim/BUILD.gn +++ chrome/app_shim/BUILD.gn
@@ -24,6 +24,7 @@ source_set("app_shim") { @@ -24,6 +24,7 @@ source_set("app_shim") {
deps = [ deps = [
"//base/allocator:early_zone_registration_apple", "//base/allocator:early_zone_registration_apple",
"//build:chromeos_buildflags", "//build:chromeos_buildflags",
+ "//cef/libcef/features", + "//cef/libcef/features:buildflags",
"//chrome:strings", "//chrome:strings",
"//chrome/app:command_ids", "//chrome/app:command_ids",
"//chrome/browser/renderer_host:history_swiper", "//chrome/browser/renderer_host:history_swiper",

View File

@@ -55,26 +55,33 @@ index 09d80f2ba678d..5dbff44c280a1 100644
explicit SyntheticGestureTargetBase(RenderWidgetHostImpl* host); explicit SyntheticGestureTargetBase(RenderWidgetHostImpl* host);
diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn
index 555c721f4db1d..515b9c7373a89 100644 index 555c721f4db1d..bf0dc7a83adb4 100644
--- third_party/blink/renderer/controller/BUILD.gn --- third_party/blink/renderer/controller/BUILD.gn
+++ third_party/blink/renderer/controller/BUILD.gn +++ third_party/blink/renderer/controller/BUILD.gn
@@ -38,6 +38,7 @@ component("controller") { @@ -3,6 +3,7 @@
} # found in the LICENSE file.
configs += [ import("//build/config/ui.gni")
+ "//cef/libcef/features:config", +import("//cef/libcef/features/features.gni")
"//third_party/blink/renderer:config", import("//testing/test.gni")
"//third_party/blink/renderer:inside_blink", import("//third_party/blink/renderer/bindings/bindings.gni")
"//third_party/blink/renderer:non_test_config", import("//third_party/blink/renderer/config.gni")
@@ -67,6 +68,8 @@ component("controller") { @@ -69,6 +70,15 @@ component("controller") {
"performance_manager/v8_detailed_memory_reporter_impl.h",
"performance_manager/v8_worker_memory_reporter.cc",
"performance_manager/v8_worker_memory_reporter.h", "performance_manager/v8_worker_memory_reporter.h",
+ "//cef/libcef/renderer/blink_glue.cc",
+ "//cef/libcef/renderer/blink_glue.h",
] ]
+ if (enable_cef) {
+ sources += [
+ "//cef/libcef/renderer/blink_glue.cc",
+ "//cef/libcef/renderer/blink_glue.h",
+ ]
+ configs += [ "//cef/libcef/features:config" ]
+ deps += [ "//cef/libcef/features:deps" ]
+ }
+
if (is_linux || is_chromeos) { if (is_linux || is_chromeos) {
sources += [
"memory_usage_monitor_posix.cc",
diff --git ui/events/keycodes/BUILD.gn ui/events/keycodes/BUILD.gn diff --git ui/events/keycodes/BUILD.gn ui/events/keycodes/BUILD.gn
index 4f4fbfb769cf8..a794da2d8343b 100644 index 4f4fbfb769cf8..a794da2d8343b 100644
--- ui/events/keycodes/BUILD.gn --- ui/events/keycodes/BUILD.gn

View File

@@ -1,5 +1,5 @@
diff --git chrome/chrome_elf/BUILD.gn chrome/chrome_elf/BUILD.gn diff --git chrome/chrome_elf/BUILD.gn chrome/chrome_elf/BUILD.gn
index a6072f97ed578..25a64c29e9c34 100644 index a6072f97ed578..945fed3bf0276 100644
--- chrome/chrome_elf/BUILD.gn --- chrome/chrome_elf/BUILD.gn
+++ chrome/chrome_elf/BUILD.gn +++ chrome/chrome_elf/BUILD.gn
@@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
@@ -24,7 +24,7 @@ index a6072f97ed578..25a64c29e9c34 100644
":hook_util", ":hook_util",
"//base", # This needs to go. DEP of app, crash_keys, client. "//base", # This needs to go. DEP of app, crash_keys, client.
"//base:base_static", # pe_image "//base:base_static", # pe_image
+ "//cef/libcef/features", + "//cef/libcef/features:buildflags",
"//chrome/install_static:install_static_util", "//chrome/install_static:install_static_util",
"//components/crash/core/app", "//components/crash/core/app",
"//components/crash/core/common", # crash_keys "//components/crash/core/common", # crash_keys
@@ -34,8 +34,8 @@ index a6072f97ed578..25a64c29e9c34 100644
] ]
+ +
+ if (enable_cef) { + if (enable_cef) {
+ configs += [ "//cef/libcef/features:config" ]
+ deps += [ "//cef:chrome_elf_set" ] + deps += [ "//cef:chrome_elf_set" ]
+ include_dirs = [ "//cef" ]
+ } else { + } else {
+ sources += [ + sources += [
+ "//chrome/app/chrome_crash_reporter_client_win.cc", + "//chrome/app/chrome_crash_reporter_client_win.cc",

View File

@@ -146,7 +146,7 @@ index 39b2de869d225..5a4e621c650ee 100644
struct Data; struct Data;
diff --git third_party/crashpad/crashpad/handler/BUILD.gn third_party/crashpad/crashpad/handler/BUILD.gn diff --git third_party/crashpad/crashpad/handler/BUILD.gn third_party/crashpad/crashpad/handler/BUILD.gn
index 104e8502908e2..45b0a92bb9d80 100644 index 104e8502908e2..9086d7b9e00fd 100644
--- third_party/crashpad/crashpad/handler/BUILD.gn --- third_party/crashpad/crashpad/handler/BUILD.gn
+++ third_party/crashpad/crashpad/handler/BUILD.gn +++ third_party/crashpad/crashpad/handler/BUILD.gn
@@ -12,6 +12,7 @@ @@ -12,6 +12,7 @@
@@ -157,10 +157,17 @@ index 104e8502908e2..45b0a92bb9d80 100644
import("../build/crashpad_buildconfig.gni") import("../build/crashpad_buildconfig.gni")
static_library("handler") { static_library("handler") {
@@ -61,6 +62,17 @@ static_library("handler") { @@ -76,11 +77,23 @@ static_library("handler") {
"../snapshot",
"../third_party/mini_chromium:chromeos_buildflags",
"../tools:tool_support",
+ "//cef/libcef/features:buildflags",
] ]
}
if (crashpad_is_win) {
cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union
}
+
+ if (enable_cef) { + if (enable_cef) {
+ sources += [ + sources += [
+ "//cef/libcef/common/cef_crash_report_upload_thread.cc", + "//cef/libcef/common/cef_crash_report_upload_thread.cc",
@@ -171,18 +178,9 @@ index 104e8502908e2..45b0a92bb9d80 100644
+ +
+ configs += [ "//cef/libcef/features:config" ] + configs += [ "//cef/libcef/features:config" ]
+ } + }
+ }
public_configs = [ "..:crashpad_config" ]
public_deps = [ if (crashpad_is_android) {
@@ -76,6 +88,7 @@ static_library("handler") {
"../snapshot",
"../third_party/mini_chromium:chromeos_buildflags",
"../tools:tool_support",
+ "//cef/libcef/features",
]
if (crashpad_is_win) {
diff --git third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc diff --git third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
index 8350d0761ac18..9fc26214c4c0a 100644 index 8350d0761ac18..9fc26214c4c0a 100644
--- third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc --- third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc