• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2014 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import("config.gni")
6if (is_clang) {
7  import("//build/config/clang/clang.gni")
8}
9
10visibility = "//third_party/WebKit/*"
11
12# features ---------------------------------------------------------------------
13
14config("features") {
15  defines = feature_defines_list
16}
17
18# inside_blink -----------------------------------------------------------------
19
20config("inside_blink") {
21  defines = [
22    "BLINK_IMPLEMENTATION=1",
23    "INSIDE_BLINK",
24  ]
25}
26
27# config -----------------------------------------------------------------------
28
29config("config") {
30  include_dirs = [ ".", ".." ]
31
32  cflags = []
33  defines = []
34
35  configs = [ ":non_test_config" ]
36
37  if (is_win) {
38    cflags += [
39      "/wd4305",  # Truncation from 'type1' to 'type2'.
40      "/wd4324",  # Struct padded due to declspec(align).
41      "/wd4714",  # Function marked forceinline not inlined.
42      "/wd4800",  # Value forced to bool.
43      "/wd4996",  # Deprecated function call.
44    ]
45  }
46
47  if (is_win) {
48    if (component_mode == "shared_library") {
49      defines += [ "USING_V8_SHARED" ]
50    }
51  } else {  # ! Windows
52    # TODO(GYP) this should be based on gcc_version >= 46 but GN doesn't have a
53    # concept of GCC version yet.
54
55    # Disable warnings about c++0x compatibility, as some names (such as
56    # nullptr) conflict with upcoming c++0x types.
57    cflags_cc = [ "-Wno-c++0x-compat" ]
58  }
59
60  if (is_linux && cpu_arch == "arm") {
61    # Due to a bug in gcc arm, we get warnings about uninitialized
62    # timesNewRoman.unstatic.3258 and colorTransparent.unstatic.4879.
63    cflags += [ "-Wno-uninitialized" ]
64  }
65
66  if (is_clang) {
67    if (blink_gc_plugin && clang_use_chrome_plugins) {
68      # TODO(GYP)
69      #'cflags': ['<!@(../../../tools/clang/scripts/blink_gc_plugin_flags.sh enable-oilpan=<(enable_oilpan) dump-graph=<(blink_gc_plugin_dump_graph))'],
70    }
71  }
72}
73
74# The follow configs apply to all targets except for unit tests, which rely on
75# static initializers.
76config("non_test_config") {
77  cflags = []
78
79  if (is_clang) {
80    cflags += [ "-Wglobal-constructors" ]
81  }
82}
83