File: config.gni

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (88 lines) | stat: -rw-r--r-- 3,519 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Copyright 2014 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/compiler/compiler.gni")
import("//build/config/ui.gni")
import("//build/toolchain/gcc_toolchain.gni")
import("//third_party/blink/public/public_features.gni")

if (is_android) {
  import("//build/config/android/config.gni")
}
if (current_cpu == "arm") {
  import("//build/config/arm.gni")
}

declare_args() {
  # If true, use PFFFT for WebAudio FFT support. Do not use for Mac because the
  # FFT library there is much faster.
  use_webaudio_pffft = target_os != "mac"
}

declare_args() {
  # Format the generated files to improve the code readability.  Apply clang-
  # format, gn format, etc. to the generated files if possible.
  blink_enable_generated_code_formatting = false

  # How many symbols to include in the build of blink. This affects
  # the performance of the build since the symbols are large and dealing with
  # them is slow.
  #   2 means regular build with symbols.
  #   1 means medium symbols, usually enough for backtraces only. Symbols with
  # internal linkage (static functions or those in anonymous namespaces) may not
  # appear when using this level. On some platforms (including Windows)
  # filenames and line numbers will be included. Information about types and
  # locals is not included.
  #   0 means minimal symbols, which on some platforms (including Windows) may
  # include function names suitable for backtraces.
  #   -1 means auto-set according to debug/release and platform.
  blink_symbol_level = -1

  # If true, the experimental renderer extensions library will be used.
  use_blink_extensions_chromeos = is_chromeos

  # If true, the WebView renderer extensions library will be used.
  #
  # Android WebView and Chrome on Android both use the same build configuration
  # for Blink, and may use a common installation of the Blink libraries on a
  # device. There is no precise concept of "is_webview". As such, Chrome on
  # Android technically has the WebView extensions available in its version of
  # Blink; however, the extensions are default-disabled. Chrome (and any other
  # non-WebView products) should never attempt to enable the extensions at
  # runtime.
  use_blink_extensions_webview = is_android
}

# feature_defines_list ---------------------------------------------------------

feature_defines_list = []

if (use_blink_extensions_chromeos) {
  feature_defines_list += [ "USE_BLINK_EXTENSIONS_CHROMEOS=1" ]
}

if (use_blink_extensions_webview) {
  feature_defines_list += [ "USE_BLINK_EXTENSIONS_WEBVIEW=1" ]
}

if (use_webaudio_pffft) {
  feature_defines_list += [ "WTF_USE_WEBAUDIO_PFFFT=1" ]
}

if (blink_symbol_level == 2) {
  blink_symbols_config = [ "//build/config/compiler:symbols" ]
} else if (blink_symbol_level == 1) {
  blink_symbols_config = [ "//build/config/compiler:minimal_symbols" ]
} else if (blink_symbol_level == 0) {
  blink_symbols_config = [ "//build/config/compiler:no_symbols" ]
} else {
  blink_symbols_config = [ "//build/config/compiler:default_symbols" ]
}

# Record whether target_os (rather than current_os) is android, for the case of
# generating the v8 context snapshot for android. When generating the snapshot
# for android, blink is compiled with current_os="linux" and
# target_os="android". Using target_os is necessary as we need to compile in the
# same way as would happen when current_os="android".
target_os_is_android = target_os == "android"