File: chrome_build.gni

package info (click to toggle)
chromium 138.0.7204.157-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 6,071,864 kB
  • sloc: cpp: 34,936,859; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,953; asm: 946,768; xml: 739,967; 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 (91 lines) | stat: -rw-r--r-- 3,262 bytes parent folder | download | duplicates (2)
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Copyright 2015 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

declare_args() {
  # Select the desired branding flavor. False means normal Chromium branding,
  # true means official Google Chrome branding (requires extra Google-internal
  # resources).
  is_chrome_branded = false

  # Whether to enable the Chrome for Testing (CfT) flavor. This arg is not
  # compatible with `is_chrome_branded`.
  #
  # Design document: https://goo.gle/chrome-for-testing
  is_chrome_for_testing = false

  # Whether to use internal Chrome for Testing (CfT).
  # Requires `src-internal/` and `is_chrome_for_testing = true`.
  #
  # When true, use Google-internal icons, otherwise fall back to Chromium icons.
  is_chrome_for_testing_branded = false

  # Set to true to enable settings for high end Android devices, typically
  # enhancing speed at the expense of resources such as binary sizes and memory.
  is_high_end_android = target_cpu == "arm64" || target_cpu == "x64"

  # Set to true to set defaults that enable features on Android that are more
  # typically available on desktop.
  is_desktop_android = false

  if (is_android) {
    # By default, Trichrome channels are compiled using separate package names.
    # Set this to 'true' to compile Trichrome channels using the Stable channel's
    # package name. This currently only affects builds with `android_channel =
    # "beta"`.
    use_stable_package_name_for_trichrome = false
  }
}

# Ensure !is_android implies !is_high_end_android.
is_high_end_android = is_high_end_android && is_android

if (is_desktop_android) {
  assert(target_os == "android",
         "Target must be Android to use is_desktop_android.")

  # Disable for non-android secondary toolchains.
  is_desktop_android = is_android
}

declare_args() {
  # Whether to apply size->speed trade-offs to the secondary toolchain.
  # Relevant only for 64-bit target_cpu.
  is_high_end_android_secondary_toolchain = false
}

assert(!is_chrome_for_testing || !is_chrome_branded,
       "`is_chrome_for_testing` is incompatible with `is_chrome_branded`")

assert(is_chrome_for_testing || !is_chrome_for_testing_branded,
       "`is_chrome_for_testing_branded` requires `is_chrome_for_testing`")

declare_args() {
  # Refers to the subdirectory for branding in various places including
  # chrome/app/theme.
  #
  # `branding_path_product` must not contain slashes.
  if (is_chrome_for_testing) {
    if (is_chrome_for_testing_branded) {
      branding_path_component = "google_chrome/google_chrome_for_testing"
    } else {
      branding_path_component = "chromium"
    }
    branding_path_product = "chromium"
  } else if (is_chrome_branded) {
    branding_path_component = "google_chrome"
    branding_path_product = "google_chrome"
  } else {
    branding_path_component = "chromium"
    branding_path_product = "chromium"
  }
}

declare_args() {
  # The path to the BRANDING file in chrome/app/theme.
  branding_file_path = "//chrome/app/theme/$branding_path_component/BRANDING"
}

# Whether to enable built-in branding assets (logos & marketing snippets) for
# search providers in choice UIs.
enable_builtin_search_provider_assets = is_chrome_branded && !is_android