Commit 53d55e0a authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

Don't build DevTools frontend on Android

Android does not use it, so we shouldn't build it.

When looking at a ninja trace on the android-binary-size trybot, this target
showed up on the critical path and taking ~2 minutes to build.

TBR=agrieve  # Mechanical BUILD target renames.

Bug: 1078460.
Change-Id: I645277778762cd5e30cd81ce84a5776d38c3fdcb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2258469
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarAndrey Kosyakov <caseq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#782113}
parent 9ca714d8
...@@ -2103,9 +2103,7 @@ jumbo_source_set("browser") { ...@@ -2103,9 +2103,7 @@ jumbo_source_set("browser") {
] ]
} }
if (!is_fuchsia) { if (!is_fuchsia && !is_android) {
# Fuchsia does not support DevTools front-end, so only only build DevTools
# resources on other platforms.
deps += [ "//content/browser/devtools:devtools_resources" ] deps += [ "//content/browser/devtools:devtools_resources" ]
} }
......
...@@ -6,42 +6,39 @@ import("//third_party/inspector_protocol/inspector_protocol.gni") ...@@ -6,42 +6,39 @@ import("//third_party/inspector_protocol/inspector_protocol.gni")
import("//third_party/protobuf/proto_library.gni") import("//third_party/protobuf/proto_library.gni")
import("//tools/grit/grit_rule.gni") import("//tools/grit/grit_rule.gni")
group("resources") { # Android and Fuchsia do not support DevTools front-end.
if (!is_android) { if (!is_android && !is_fuchsia) {
public_deps = [ ":devtools_resources" ] grit("devtools_resources") {
} source = "$root_gen_dir/devtools/devtools_resources.grd"
}
grit("devtools_resources") { # Required because the .grd is generated.
source = "$root_gen_dir/devtools/devtools_resources.grd" enable_input_discovery_for_gn_analyze = false
use_brotli = true
# Required because the .grd is generated. outputs = [
enable_input_discovery_for_gn_analyze = false "grit/devtools_resources.h",
use_brotli = true "devtools_resources.pak",
"grit/devtools_resources_map.cc",
outputs = [ "grit/devtools_resources_map.h",
"grit/devtools_resources.h", ]
"devtools_resources.pak",
"grit/devtools_resources_map.cc",
"grit/devtools_resources_map.h",
]
grit_flags = [ grit_flags = [
"-E", "-E",
"protocol_file=" + rebase_path( "protocol_file=" + rebase_path(
"$root_gen_dir/third_party/blink/public/devtools_protocol/protocol.json", "$root_gen_dir/third_party/blink/public/devtools_protocol/protocol.json",
root_build_dir), root_build_dir),
] ]
defines = defines = [ "SHARED_INTERMEDIATE_DIR=" +
[ "SHARED_INTERMEDIATE_DIR=" + rebase_path(root_gen_dir, root_build_dir) ] rebase_path(root_gen_dir, root_build_dir) ]
deps = [ deps = [
"//third_party/blink/public/devtools_protocol:protocol_version", "//third_party/blink/public/devtools_protocol:protocol_version",
# This is the action that generates out .grd input file. # This is the action that generates out .grd input file.
"//third_party/blink/public:blink_generate_devtools_grd", "//third_party/blink/public:blink_generate_devtools_grd",
] ]
}
} }
inspector_protocol_generate("protocol_sources") { inspector_protocol_generate("protocol_sources") {
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
#include "base/android/build_info.h" #include "base/android/build_info.h"
#endif #endif
#if !defined(OS_FUCHSIA) #if !defined(OS_ANDROID) && !defined(OS_FUCHSIA)
#include "content/browser/devtools/grit/devtools_resources.h" // nogncheck #include "content/browser/devtools/grit/devtools_resources.h" // nogncheck
#endif #endif
...@@ -654,7 +654,7 @@ void DevToolsHttpHandler::OnJsonRequest( ...@@ -654,7 +654,7 @@ void DevToolsHttpHandler::OnJsonRequest(
} }
void DevToolsHttpHandler::DecompressAndSendJsonProtocol(int connection_id) { void DevToolsHttpHandler::DecompressAndSendJsonProtocol(int connection_id) {
#if defined(OS_FUCHSIA) #if defined(OS_ANDROID) || defined(OS_FUCHSIA)
NOTREACHED(); NOTREACHED();
#else #else
scoped_refptr<base::RefCountedMemory> bytes = scoped_refptr<base::RefCountedMemory> bytes =
...@@ -669,7 +669,7 @@ void DevToolsHttpHandler::DecompressAndSendJsonProtocol(int connection_id) { ...@@ -669,7 +669,7 @@ void DevToolsHttpHandler::DecompressAndSendJsonProtocol(int connection_id) {
FROM_HERE, base::BindOnce(&ServerWrapper::SendResponse, FROM_HERE, base::BindOnce(&ServerWrapper::SendResponse,
base::Unretained(server_wrapper_.get()), base::Unretained(server_wrapper_.get()),
connection_id, response)); connection_id, response));
#endif // defined(OS_FUCHSIA) #endif // defined(OS_ANDROID) || defined(OS_FUCHSIA)
} }
void DevToolsHttpHandler::RespondToJsonList( void DevToolsHttpHandler::RespondToJsonList(
......
...@@ -700,10 +700,10 @@ repack("pak") { ...@@ -700,10 +700,10 @@ repack("pak") {
sources += sources +=
[ "$root_gen_dir/ui/views/resources/views_resources_100_percent.pak" ] [ "$root_gen_dir/ui/views/resources/views_resources_100_percent.pak" ]
} }
if (!is_android) { if (!is_android && !is_fuchsia) {
sources += sources +=
[ "$root_gen_dir/content/browser/devtools/devtools_resources.pak" ] [ "$root_gen_dir/content/browser/devtools/devtools_resources.pak" ]
deps += [ "//content/browser/devtools:resources" ] deps += [ "//content/browser/devtools:devtools_resources" ]
} }
output = "$root_out_dir/content_shell.pak" output = "$root_out_dir/content_shell.pak"
} }
......
...@@ -30,7 +30,6 @@ repack("pak") { ...@@ -30,7 +30,6 @@ repack("pak") {
"$root_gen_dir/components/components_resources.pak", "$root_gen_dir/components/components_resources.pak",
"$root_gen_dir/components/strings/components_strings_en-US.pak", "$root_gen_dir/components/strings/components_strings_en-US.pak",
"$root_gen_dir/content/app/resources/content_resources_100_percent.pak", "$root_gen_dir/content/app/resources/content_resources_100_percent.pak",
"$root_gen_dir/content/browser/devtools/devtools_resources.pak",
"$root_gen_dir/content/browser/tracing/tracing_resources.pak", "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
"$root_gen_dir/content/content_resources.pak", "$root_gen_dir/content/content_resources.pak",
"$root_gen_dir/content/dev_ui_content_resources.pak", "$root_gen_dir/content/dev_ui_content_resources.pak",
...@@ -59,7 +58,6 @@ repack("pak") { ...@@ -59,7 +58,6 @@ repack("pak") {
"//content:content_resources", "//content:content_resources",
"//content:dev_ui_content_resources", "//content:dev_ui_content_resources",
"//content/app/resources", "//content/app/resources",
"//content/browser/devtools:resources",
"//content/browser/tracing:resources", "//content/browser/tracing:resources",
"//mojo/public/js:resources", "//mojo/public/js:resources",
"//net:net_resources", "//net:net_resources",
...@@ -70,6 +68,12 @@ repack("pak") { ...@@ -70,6 +68,12 @@ repack("pak") {
"//ui/strings", "//ui/strings",
] ]
if (!is_fuchsia) {
sources +=
[ "$root_gen_dir/content/browser/devtools/devtools_resources.pak" ]
deps += [ "//content/browser/devtools:devtools_resources" ]
}
output = "$root_out_dir/headless_lib.pak" output = "$root_out_dir/headless_lib.pak"
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment