OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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("clang.gni") | 5 import("clang.gni") |
6 import("//build/config/chromecast_build.gni") | |
7 | 6 |
8 config("find_bad_constructs") { | 7 config("find_bad_constructs") { |
9 if (clang_use_chrome_plugins) { | 8 if (clang_use_chrome_plugins) { |
10 cflags = [] | 9 cflags = [] |
11 | 10 |
12 # On Windows, the plugin is built directly into clang, so there's | 11 # On Windows, the plugin is built directly into clang, so there's |
13 # no need to load it dynamically. | 12 # no need to load it dynamically. |
14 | 13 |
15 if (is_mac || is_ios) { | 14 if (is_mac || is_ios) { |
16 cflags += [ | 15 cflags += [ |
(...skipping 17 matching lines...) Expand all Loading... |
34 "-Xclang", | 33 "-Xclang", |
35 "-add-plugin", | 34 "-add-plugin", |
36 "-Xclang", | 35 "-Xclang", |
37 "find-bad-constructs", | 36 "find-bad-constructs", |
38 "-Xclang", | 37 "-Xclang", |
39 "-plugin-arg-find-bad-constructs", | 38 "-plugin-arg-find-bad-constructs", |
40 "-Xclang", | 39 "-Xclang", |
41 "check-auto-raw-pointer", | 40 "check-auto-raw-pointer", |
42 ] | 41 ] |
43 | 42 |
44 if ((is_linux || is_android) && !is_chromecast) { | 43 if (is_linux || is_android) { |
45 cflags += [ | 44 cflags += [ |
46 "-Xclang", | 45 "-Xclang", |
47 "-plugin-arg-find-bad-constructs", | 46 "-plugin-arg-find-bad-constructs", |
48 "-Xclang", | 47 "-Xclang", |
49 "check-ipc", | 48 "check-ipc", |
50 ] | 49 ] |
51 } | 50 } |
52 } | 51 } |
53 } | 52 } |
54 | 53 |
55 # Enables some extra Clang-specific warnings. Some third-party code won't | 54 # Enables some extra Clang-specific warnings. Some third-party code won't |
56 # compile with these so may want to remove this config. | 55 # compile with these so may want to remove this config. |
57 config("extra_warnings") { | 56 config("extra_warnings") { |
58 cflags = [ | 57 cflags = [ |
59 "-Wheader-hygiene", | 58 "-Wheader-hygiene", |
60 | 59 |
61 # Warns when a const char[] is converted to bool. | 60 # Warns when a const char[] is converted to bool. |
62 "-Wstring-conversion", | 61 "-Wstring-conversion", |
63 | 62 |
64 "-Wtautological-overlap-compare", | 63 "-Wtautological-overlap-compare", |
65 ] | 64 ] |
66 } | 65 } |
OLD | NEW |