summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/config.gni
blob: 6962087f46244325850e73374c267c0f0ac9cb4e (plain)
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
# 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, defaults image interpolation to low quality.
  use_low_quality_image_interpolation = is_android

  # If true, ffmpeg will be used for computing FFTs for WebAudio
  use_webaudio_ffmpeg = !is_mac && !is_android && !use_webaudio_pffft

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

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

feature_defines_list = []

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

if (use_low_quality_image_interpolation) {
  feature_defines_list += [ "WTF_USE_LOW_QUALITY_IMAGE_INTERPOLATION=1" ]
}

if (use_webaudio_ffmpeg) {
  feature_defines_list += [ "WTF_USE_WEBAUDIO_FFMPEG=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" ]
}