File: BUILD.gn

package info (click to toggle)
chromium 138.0.7204.183-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,071,908 kB
  • sloc: cpp: 34,937,088; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,953; asm: 946,768; xml: 739,971; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,806; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (69 lines) | stat: -rw-r--r-- 2,165 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Copyright 2021 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//chrome/common/features.gni")
import("//extensions/buildflags/buildflags.gni")
import("//tools/grit/grit_rule.gni")
import("//ui/webui/resources/tools/generate_grd.gni")

assert(enable_extensions)

# Use a static library here because many test binaries depend on this but don't
# require many files from it. This makes linking more efficient.
static_library("extensions") {
  sources = [
    "chromeos_system_extension_info.cc",
    "chromeos_system_extension_info.h",
    "chromeos_system_extensions_api_permissions.cc",
    "chromeos_system_extensions_api_permissions.h",
    "chromeos_system_extensions_api_provider.cc",
    "chromeos_system_extensions_api_provider.h",
    "chromeos_system_extensions_manifest_constants.cc",
    "chromeos_system_extensions_manifest_constants.h",
    "chromeos_system_extensions_manifest_handler.cc",
    "chromeos_system_extensions_manifest_handler.h",
  ]

  configs += [ "//build/config/compiler:wexit_time_destructors" ]

  public_deps = [ "//components/web_package" ]

  deps = [
    ":resources",
    "api:api",
    "api:extensions_features",
    "//base",
    "//chrome/common:url_constants",
    "//chromeos/constants",
    "//extensions/common",
  ]

  if (is_chromeos) {
    deps += [ "//ash/constants" ]
  }
}

grd_file = "$target_gen_dir/chromeos_system_extensions_resources.grd"

generate_grd("build_grd") {
  grd_prefix = "chromeos_system_extensions"
  out_grd = grd_file
  input_files = [ "api/_api_features.json" ]
  input_files_base_dir = rebase_path(".", "//")
}

grit("resources") {
  source = grd_file
  defines = chrome_grit_defines
  enable_input_discovery_for_gn_analyze = false
  output_dir = "$root_gen_dir/chrome/common/chromeos/extensions"
  output_name = "chromeos_system_extensions_resources"
  outputs = [
    "grit/chromeos_system_extensions_resources.h",
    "grit/chromeos_system_extensions_resources_map.cc",
    "grit/chromeos_system_extensions_resources_map.h",
    "chromeos_system_extensions_resources.pak",
  ]
  deps = [ ":build_grd" ]
}