blob: 309b316f77e24ec1982f42f527d54a79db1fece6 [file] [log] [blame]
# 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("config.gni")
if (is_clang) {
import("//build/config/clang/clang.gni")
}
# features ---------------------------------------------------------------------
config("features") {
defines = [
"ENABLE_CUSTOM_SCHEME_HANDLER=0",
"ENABLE_SVG_FONTS=1",
]
if (is_debug) {
# TODO(GYP) this should also be set when release_valgrind_build is set,
# but we don't have that flag in the GN build yet.
defines += [ "WTF_USE_DYNAMIC_ANNOTATIONS=1" ]
}
if (use_concatenated_impulse_responses) {
defines += [ "WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1" ]
}
if (is_android) {
defines += [
"ENABLE_FAST_MOBILE_SCROLLING=1",
"ENABLE_MEDIA_CAPTURE=1",
]
} else {
defines += [
"ENABLE_INPUT_MULTIPLE_FIELDS_UI=1",
"ENABLE_MEDIA_CAPTURE=0",
"ENABLE_WEB_AUDIO=1",
]
}
if (use_webaudio_ffmpeg) {
defines += [ "WTF_USE_WEBAUDIO_FFMPEG=1" ]
}
if (use_openmax_dl_fft) {
defines += [
"WTF_USE_WEBAUDIO_OPENMAX_DL_FFT=1",
# Enabling the FFT is enough to enable WebAudio support to
# allow most WebAudio features to work on Android.
"ENABLE_WEB_AUDIO=1",
]
}
if (!is_mac) {
# Mac OS X has not implemented support for ENABLE(OPENTYPE_VERTICAL) yet.
defines += [ "ENABLE_OPENTYPE_VERTICAL=1" ]
}
if (use_default_render_theme) {
defines += [ "WTF_USE_DEFAULT_RENDER_THEME=1" ]
}
if (enable_oilpan) {
defines += [ "ENABLE_OILPAN=1" ]
}
}
# config -----------------------------------------------------------------------
config("config") {
include_dirs = [ ".", ".." ]
cflags = []
defines = []
if (is_win) {
cflags += [
"/wd4305", # Truncation from 'type1' to 'type2'.
"/wd4324", # Struct padded due to declspec(align).
"/wd4714", # Function marked forceinline not inlined.
"/wd4996", # Deprecated function call.
]
}
if (is_win) {
if (component_mode == "shared_library") {
defines += [ "USING_V8_SHARED" ]
}
} else { # ! Windows
# TODO(GYP) this should be based on gcc_version >= 46 but GN doesn't have a
# concept of GCC version yet.
# Disable warnings about c++0x compatibility, as some names (such as
# nullptr) conflict with upcoming c++0x types.
cflags_cc = [ "-Wno-c++0x-compat" ]
}
if (is_linux && cpu_arch == "arm") {
# Due to a bug in gcc arm, we get warnings about uninitialized
# timesNewRoman.unstatic.3258 and colorTransparent.unstatic.4879.
cflags += [ "-Wno-uninitialized" ]
}
if (is_clang) {
cflags += [ "-Wglobal-constructors" ]
if (blink_gc_plugin && clang_use_chrome_plugins) {
# TODO(GYP)
#'cflags': ['<!@(../../../tools/clang/scripts/blink_gc_plugin_flags.sh enable-oilpan=<(enable_oilpan) dump-graph=<(blink_gc_plugin_dump_graph))'],
}
}
}