| # Copyright 2014 The Chromium Authors. All rights reserved. |
| # 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("//third_party/WebKit/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, doesn't compile debug symbols into webcore reducing the |
| # size of the binary and increasing the speed of gdb. |
| remove_webcore_debug_symbols = false |
| |
| # If true, defaults image interpolation to low quality. |
| use_low_quality_image_interpolation = is_android |
| |
| # If true, ffmpeg will be used for decoding audio. |
| use_webaudio_ffmpeg = !is_mac && !is_android |
| } |
| |
| # Whether Android build uses OpenMAX DL FFT. Currently supported only on |
| # ARMv7+, ARM64, x86 or x64 without webview. Also enables WebAudio support. |
| # Whether WebAudio is actually available depends on runtime settings and flags. |
| use_openmax_dl_fft = |
| is_android && (current_cpu == "x86" || current_cpu == "x64" || |
| (current_cpu == "arm" && arm_version >= 7) || |
| current_cpu == "arm64" || current_cpu == "mipsel") |
| |
| # TODO(tkent): Remove this flag after the great mv. crbug.com/760462 |
| snake_case_source_files = false |
| |
| # feature_defines_list --------------------------------------------------------- |
| |
| feature_defines_list = [] |
| |
| if (is_debug) { |
| feature_defines_list += [ "WTF_USE_DYNAMIC_ANNOTATIONS=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_openmax_dl_fft) { |
| feature_defines_list += [ "WTF_USE_WEBAUDIO_OPENMAX_DL_FFT=1" ] |
| } |
| |
| if (use_default_render_theme) { |
| # Mirrors the USE_DEFAULT_RENDER_THEME buildflag_header in WebKit/public. |
| # If/when Blink can use buildflag headers, this should be removed in |
| # preference to that. |
| feature_defines_list += [ "WTF_USE_DEFAULT_RENDER_THEME=1" ] |
| } |
| |
| if (remove_webcore_debug_symbols) { |
| if (is_win && symbol_level != 0) { |
| # If we use no_symbols on Windows when symbol_level is not zero then no |
| # PDB will be generated but ninja will be expecting one. This would mean |
| # that the build would always be dirty. Using minimal_symbols in this |
| # situation keeps the build times fast (roughly identical to no_symbols) |
| # while still generating a PDB to keep ninja happy (and it gives us proper |
| # call stacks). |
| remove_webcore_symbols_config = |
| [ "//build/config/compiler:minimal_symbols" ] |
| } else { |
| remove_webcore_symbols_config = [ "//build/config/compiler:no_symbols" ] |
| } |
| } |