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 if (is_posix) { | 9 if (is_posix) { |
10 import("//build/config/gcc/gcc_version.gni") | 10 import("//build/config/gcc/gcc_version.gni") |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 config("config") { | 32 config("config") { |
33 include_dirs = [ | 33 include_dirs = [ |
34 ".", | 34 ".", |
35 "$root_gen_dir/sky", | 35 "$root_gen_dir/sky", |
36 ] | 36 ] |
37 | 37 |
38 cflags = [] | 38 cflags = [] |
39 defines = [] | 39 defines = [] |
40 | 40 |
41 if (is_win) { | 41 # TODO(GYP) this should be based on gcc_version >= 46 but GN doesn't have a |
42 cflags += [ | 42 # concept of GCC version yet. |
43 "/wd4065", # Switch statement contains 'default' but no 'case' labels. | |
44 # In generated parser code. | |
45 "/wd4305", # Truncation from 'type1' to 'type2'. | |
46 "/wd4324", # Struct padded due to declspec(align). | |
47 "/wd4702", # Unreachable code, happens in bison-generated code. | |
48 "/wd4714", # Function marked forceinline not inlined. | |
49 "/wd4800", # Value forced to bool. | |
50 "/wd4996", # Deprecated function call. | |
51 ] | |
52 } | |
53 | 43 |
54 if (is_win) { | 44 # Disable warnings about c++0x compatibility, as some names (such as |
55 if (component_mode == "shared_library") { | 45 # nullptr) conflict with upcoming c++0x types. |
56 defines += [ "USING_V8_SHARED" ] | 46 cflags_cc = [ "-Wno-c++0x-compat" ] |
57 } | |
58 } else { # ! Windows | |
59 # TODO(GYP) this should be based on gcc_version >= 46 but GN doesn't have a | |
60 # concept of GCC version yet. | |
61 | |
62 # Disable warnings about c++0x compatibility, as some names (such as | |
63 # nullptr) conflict with upcoming c++0x types. | |
64 cflags_cc = [ "-Wno-c++0x-compat" ] | |
65 } | |
66 | 47 |
67 if (is_linux && cpu_arch == "arm") { | 48 if (is_linux && cpu_arch == "arm") { |
68 # Due to a bug in gcc arm, we get warnings about uninitialized | 49 # Due to a bug in gcc arm, we get warnings about uninitialized |
69 # timesNewRoman.unstatic.3258 and colorTransparent.unstatic.4879. | 50 # timesNewRoman.unstatic.3258 and colorTransparent.unstatic.4879. |
70 cflags += [ "-Wno-uninitialized" ] | 51 cflags += [ "-Wno-uninitialized" ] |
71 } | 52 } |
72 | 53 |
73 if (is_posix && gcc_version >= 49) { | 54 if (is_posix && gcc_version >= 49) { |
74 cflags += [ "-Wno-unused-but-set-variable" ] | 55 cflags += [ "-Wno-unused-but-set-variable" ] |
75 } | 56 } |
76 | 57 |
77 if (is_clang) { | 58 if (is_clang) { |
78 if (sky_gc_plugin && clang_use_chrome_plugins) { | 59 if (sky_gc_plugin && clang_use_chrome_plugins) { |
79 # TODO(GYP) | 60 # TODO(GYP) |
80 #'cflags': ['<!@(../../tools/clang/scripts/blink_gc_plugin_flags.sh enable
-oilpan=<(sky_enable_oilpan) dump-graph=<(sky_gc_plugin_dump_graph))'], | 61 #'cflags': ['<!@(../../tools/clang/scripts/blink_gc_plugin_flags.sh enable
-oilpan=<(sky_enable_oilpan) dump-graph=<(sky_gc_plugin_dump_graph))'], |
81 } | 62 } |
82 } | 63 } |
83 } | 64 } |
84 | 65 |
85 # The follow configs apply to all targets except for unit tests, which rely on | 66 # The follow configs apply to all targets except for unit tests, which rely on |
86 # static initializers. | 67 # static initializers. |
87 config("non_test_config") { | 68 config("non_test_config") { |
88 cflags = [] | 69 cflags = [] |
89 | 70 |
90 if (is_clang) { | 71 if (is_clang) { |
91 cflags += [ "-Wglobal-constructors" ] | 72 cflags += [ "-Wglobal-constructors" ] |
92 } | 73 } |
93 } | 74 } |
OLD | NEW |