Skip to content

Commit

Permalink
Revert "Integrate DevTools with Chrome branded builds"
Browse files Browse the repository at this point in the history
This reverts commit 959daef.

Reason for revert: Breaks LICENSE file generation step for
Chrome-branded Fuchsia builders.

Original change's description:
> Integrate DevTools with Chrome branded builds
>
> Bug: chromium:1220020
> Change-Id: I45ab238b68fdb3f6cc65481fffbc84938ef4b701
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3062838
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@google.com>
> Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#916361}

Bug: 1220020, 1244564
Change-Id: I531519a1c0bab107a184defdfefd5c52a73b8969
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3129441
Auto-Submit: Wez <wez@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Ella Ge <eirage@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Owners-Override: Ella Ge <eirage@google.com>
Cr-Commit-Position: refs/heads/main@{#916440}
  • Loading branch information
Wez authored and Chromium LUCI CQ committed Aug 30, 2021
1 parent b5756d4 commit 336abff
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 47 deletions.
2 changes: 0 additions & 2 deletions .gn
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ default_args = {
angle_vulkan_tools_dir = "//third_party/vulkan-deps/vulkan-tools/src"
angle_vulkan_validation_layers_dir =
"//third_party/vulkan-deps/vulkan-validation-layers/src"

devtools_visibility = [ "*" ]
}

# These are the targets to skip header checking by default. The files in targets
Expand Down
23 changes: 2 additions & 21 deletions build/config/devtools.gni
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,17 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/chrome_build.gni")
import("//build_overrides/build.gni")

declare_args() {
if (build_with_chromium) {
# devtools_location is used in DevTools to resolve to the correct location
# This argument is used in DevTools to resolve to the correct location
# for any script/file referenced in the DevTools build scripts. Since
# DevTools supports both a standalone build and build integration with
# Chromium, we need to differentiate between the two versions.
# devtools_location points to the Chromium version in both Chrome-branded
# and not Chrome-branded builds. devtools_root_location points to the root
# of the Chrome-branded version when is_chrome_branded is true and to the root
# of the Chromium version when is_chrome_branded is false.
# devtools_grd_location is the location of the GRD file listing all DevTools
# resources.
if (is_chrome_branded) {
devtools_root_location = "third_party/devtools-frontend-internal"
devtools_location = "$devtools_root_location/devtools-frontend/"
devtools_grd_location =
"$devtools_root_location/chrome_devtools_resources.grd"
} else {
devtools_root_location = "third_party/devtools-frontend/src"
devtools_location = "third_party/devtools-frontend/src/"
devtools_grd_location =
"$devtools_root_location/front_end/devtools_resources.grd"
}
devtools_location = "third_party/devtools-frontend/src/"
} else {
# DevTools is building a standalone version
devtools_location = ""
devtools_root_location = ""
devtools_grd_location = ""
}
}
3 changes: 1 addition & 2 deletions content/browser/devtools/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/devtools.gni")
import("//components/viz/common/debugger/viz_debugger.gni")
import("//third_party/inspector_protocol/inspector_protocol.gni")
import("//third_party/protobuf/proto_library.gni")
Expand All @@ -11,7 +10,7 @@ import("//tools/grit/grit_rule.gni")
# Android does not support DevTools front-end.
if (!is_android) {
grit("devtools_resources") {
source = "$root_gen_dir/$devtools_grd_location"
source = "$root_gen_dir/third_party/devtools-frontend/src/front_end/devtools_resources.grd"

# Required because the .grd is generated.
enable_input_discovery_for_gn_analyze = false
Expand Down
14 changes: 3 additions & 11 deletions third_party/blink/public/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import("//build/buildflag_header.gni")
import("//build/config/dcheck_always_on.gni")
import("//build/config/devtools.gni")
import("//mojo/public/tools/bindings/mojom.gni")
import("//third_party/blink/public/public_features.gni")
import("//third_party/blink/renderer/config.gni")
Expand Down Expand Up @@ -474,7 +473,7 @@ source_set("blink_headers") {
]
}

devtools_frontend_path = "//$devtools_root_location"
devtools_frontend_path = "//third_party/devtools-frontend/src"

group("blink_devtools_frontend_resources") {
public_deps = [ "$devtools_frontend_path:devtools_frontend_resources" ]
Expand Down Expand Up @@ -515,15 +514,8 @@ grit("devtools_inspector_resources") {
"inspector_overlay_resources.pak",
]

_shared_intermediate_dir = rebase_path(root_out_dir, root_build_dir)
_devtools_grd_path = "$shared_intermediate_dir/$devtools_grd_location"
_devtools_grd_path_no_ext = get_path_info(_devtools_grd_path, "dir") + "/" +
get_path_info(_devtools_grd_path, "name")

defines = [
"SHARED_INTERMEDIATE_DIR=" + _shared_intermediate_dir,
"DEVTOOLS_GRD_PATH=" + _devtools_grd_path_no_ext,
]
defines =
[ "SHARED_INTERMEDIATE_DIR=" + rebase_path(root_out_dir, root_build_dir) ]

deps = [
"$devtools_frontend_path:generate_devtools_inspector_overlay_resources",
Expand Down
10 changes: 1 addition & 9 deletions tools/grit/grit_defines.gni
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,15 @@
import("//build/config/chrome_build.gni")
import("//build/config/chromeos/ui_mode.gni")
import("//build/config/crypto.gni")
import("//build/config/devtools.gni")
import("//build/config/ui.gni")

shared_intermediate_dir = rebase_path(root_gen_dir, root_build_dir)
devtools_grd_path = "$shared_intermediate_dir/$devtools_grd_location"
devtools_grd_path_no_ext = get_path_info(devtools_grd_path, "dir") + "/" +
get_path_info(devtools_grd_path, "name")

grit_defines = [
"-E",
"root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
"-E",
"root_src_dir=" + rebase_path("//", root_build_dir),
"-D",
"SHARED_INTERMEDIATE_DIR=" + shared_intermediate_dir,
"-D",
"DEVTOOLS_GRD_PATH=" + devtools_grd_path_no_ext,
"SHARED_INTERMEDIATE_DIR=" + rebase_path(root_gen_dir, root_build_dir),
]

if (is_mac || is_win || is_linux || is_chromeos || is_ios) {
Expand Down
3 changes: 1 addition & 2 deletions tools/gritsettings/resource_ids.spec
Original file line number Diff line number Diff line change
Expand Up @@ -837,8 +837,7 @@
},

# This file is generated during the build.
# .grd extension is required because it's checked before var interpolation.
"<(DEVTOOLS_GRD_PATH).grd": {
"<(SHARED_INTERMEDIATE_DIR)/third_party/devtools-frontend/src/front_end/devtools_resources.grd": {
# In debug build, devtools frontend sources are not bundled and therefore
# includes a lot of individual resources
"META": {"sizes": {"includes": [2000],}},
Expand Down

0 comments on commit 336abff

Please sign in to comment.