OLD | NEW |
---|---|
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("config.gni") | 5 import("config.gni") |
6 if (is_clang) { | 6 if (is_clang) { |
7 import("//build/config/clang/clang.gni") | 7 import("//build/config/clang/clang.gni") |
8 } | 8 } |
9 | 9 |
10 # features --------------------------------------------------------------------- | 10 # features --------------------------------------------------------------------- |
(...skipping 12 matching lines...) Expand all Loading... | |
23 } | 23 } |
24 | 24 |
25 # config ----------------------------------------------------------------------- | 25 # config ----------------------------------------------------------------------- |
26 | 26 |
27 config("config") { | 27 config("config") { |
28 include_dirs = [ ".", ".." ] | 28 include_dirs = [ ".", ".." ] |
29 | 29 |
30 cflags = [] | 30 cflags = [] |
31 defines = [] | 31 defines = [] |
32 | 32 |
33 configs = [ ":non_test_config" ] | |
34 | |
33 if (is_win) { | 35 if (is_win) { |
34 cflags += [ | 36 cflags += [ |
35 "/wd4305", # Truncation from 'type1' to 'type2'. | 37 "/wd4305", # Truncation from 'type1' to 'type2'. |
36 "/wd4324", # Struct padded due to declspec(align). | 38 "/wd4324", # Struct padded due to declspec(align). |
37 "/wd4714", # Function marked forceinline not inlined. | 39 "/wd4714", # Function marked forceinline not inlined. |
38 "/wd4800", # Value forced to bool. | 40 "/wd4800", # Value forced to bool. |
39 "/wd4996", # Deprecated function call. | 41 "/wd4996", # Deprecated function call. |
40 ] | 42 ] |
41 } | 43 } |
42 | 44 |
(...skipping 10 matching lines...) Expand all Loading... | |
53 cflags_cc = [ "-Wno-c++0x-compat" ] | 55 cflags_cc = [ "-Wno-c++0x-compat" ] |
54 } | 56 } |
55 | 57 |
56 if (is_linux && cpu_arch == "arm") { | 58 if (is_linux && cpu_arch == "arm") { |
57 # Due to a bug in gcc arm, we get warnings about uninitialized | 59 # Due to a bug in gcc arm, we get warnings about uninitialized |
58 # timesNewRoman.unstatic.3258 and colorTransparent.unstatic.4879. | 60 # timesNewRoman.unstatic.3258 and colorTransparent.unstatic.4879. |
59 cflags += [ "-Wno-uninitialized" ] | 61 cflags += [ "-Wno-uninitialized" ] |
60 } | 62 } |
61 | 63 |
62 if (is_clang) { | 64 if (is_clang) { |
63 cflags += [ "-Wglobal-constructors" ] | |
64 if (blink_gc_plugin && clang_use_chrome_plugins) { | 65 if (blink_gc_plugin && clang_use_chrome_plugins) { |
65 # TODO(GYP) | 66 # TODO(GYP) |
66 #'cflags': ['<!@(../../../tools/clang/scripts/blink_gc_plugin_flags.sh ena ble-oilpan=<(enable_oilpan) dump-graph=<(blink_gc_plugin_dump_graph))'], | 67 #'cflags': ['<!@(../../../tools/clang/scripts/blink_gc_plugin_flags.sh ena ble-oilpan=<(enable_oilpan) dump-graph=<(blink_gc_plugin_dump_graph))'], |
67 } | 68 } |
68 } | 69 } |
69 } | 70 } |
70 | 71 |
72 # The follow configs apply to all targets except for unit tests, which rely on s tatic | |
brettw
2014/06/03 21:14:03
80 cols
| |
73 # initializers. This config is included by everything that uses ":config" and th en removed | |
74 # for unit test targets. | |
75 config("non_test_config") { | |
76 cflags = [] | |
77 | |
78 if (is_clang) { | |
79 cflags += [ "-Wglobal-constructors" ] | |
80 } | |
81 } | |
82 | |
71 # stubs ------------------------------------------------------------------------ | 83 # stubs ------------------------------------------------------------------------ |
72 | 84 |
73 # These set up include paths for targets that haven't been converted yet. They | 85 # These set up include paths for targets that haven't been converted yet. They |
74 # can be removed when the corresponding targets have been converted to GN. | 86 # can be removed when the corresponding targets have been converted to GN. |
75 config("npapi_stub") { | 87 config("npapi_stub") { |
76 include_dirs = [ "//third_party/npapi", "//third_party/npapi/bindings" ] | 88 include_dirs = [ "//third_party/npapi", "//third_party/npapi/bindings" ] |
77 } | 89 } |
OLD | NEW |