xref: /aosp_15_r20/external/angle/build/config/devtools.gni (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1*8975f5c5SAndroid Build Coastguard Worker# Copyright 2021 The Chromium Authors
2*8975f5c5SAndroid Build Coastguard Worker# Use of this source code is governed by a BSD-style license that can be
3*8975f5c5SAndroid Build Coastguard Worker# found in the LICENSE file.
4*8975f5c5SAndroid Build Coastguard Worker
5*8975f5c5SAndroid Build Coastguard Workerimport("//build/config/chrome_build.gni")
6*8975f5c5SAndroid Build Coastguard Workerimport("//build_overrides/build.gni")
7*8975f5c5SAndroid Build Coastguard Worker
8*8975f5c5SAndroid Build Coastguard Workerdeclare_args() {
9*8975f5c5SAndroid Build Coastguard Worker  if (build_with_chromium) {
10*8975f5c5SAndroid Build Coastguard Worker    # devtools_location is used in DevTools to resolve to the correct location
11*8975f5c5SAndroid Build Coastguard Worker    # for any script/file referenced in the DevTools build scripts. Since
12*8975f5c5SAndroid Build Coastguard Worker    # DevTools supports both a standalone build and build integration with
13*8975f5c5SAndroid Build Coastguard Worker    # Chromium, we need to differentiate between the two versions.
14*8975f5c5SAndroid Build Coastguard Worker    # devtools_location points to the Chromium version in both Chrome-branded
15*8975f5c5SAndroid Build Coastguard Worker    # and not Chrome-branded builds. devtools_root_location points to the root
16*8975f5c5SAndroid Build Coastguard Worker    # of the Chrome-branded version when is_chrome_branded is true and to the root
17*8975f5c5SAndroid Build Coastguard Worker    # of the Chromium version when is_chrome_branded is false.
18*8975f5c5SAndroid Build Coastguard Worker    # devtools_grd_location is the location of the GRD file listing all DevTools
19*8975f5c5SAndroid Build Coastguard Worker    # resources.
20*8975f5c5SAndroid Build Coastguard Worker    if (is_chrome_branded) {
21*8975f5c5SAndroid Build Coastguard Worker      devtools_root_location = "third_party/devtools-frontend-internal"
22*8975f5c5SAndroid Build Coastguard Worker      devtools_location = "$devtools_root_location/devtools-frontend/"
23*8975f5c5SAndroid Build Coastguard Worker      devtools_grd_location =
24*8975f5c5SAndroid Build Coastguard Worker          "$devtools_root_location/chrome_devtools_resources.grd"
25*8975f5c5SAndroid Build Coastguard Worker    } else {
26*8975f5c5SAndroid Build Coastguard Worker      devtools_root_location = "third_party/devtools-frontend/src"
27*8975f5c5SAndroid Build Coastguard Worker      devtools_location = "third_party/devtools-frontend/src/"
28*8975f5c5SAndroid Build Coastguard Worker      devtools_grd_location =
29*8975f5c5SAndroid Build Coastguard Worker          "$devtools_root_location/front_end/devtools_resources.grd"
30*8975f5c5SAndroid Build Coastguard Worker    }
31*8975f5c5SAndroid Build Coastguard Worker  } else {
32*8975f5c5SAndroid Build Coastguard Worker    # DevTools is building a standalone version
33*8975f5c5SAndroid Build Coastguard Worker    devtools_location = ""
34*8975f5c5SAndroid Build Coastguard Worker    devtools_root_location = ""
35*8975f5c5SAndroid Build Coastguard Worker    devtools_grd_location = ""
36*8975f5c5SAndroid Build Coastguard Worker  }
37*8975f5c5SAndroid Build Coastguard Worker}
38