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 | 6 |
7 config("find_bad_constructs") { | 7 config("find_bad_constructs") { |
8 if (clang_use_chrome_plugins) { | 8 if (clang_use_chrome_plugins) { |
9 cflags = [] | 9 cflags = [] |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 "-Xclang", | 25 "-Xclang", |
26 "-load", | 26 "-load", |
27 "-Xclang", | 27 "-Xclang", |
28 rebase_path( | 28 rebase_path( |
29 "//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.s
o", | 29 "//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.s
o", |
30 root_build_dir), | 30 root_build_dir), |
31 ] | 31 ] |
32 } | 32 } |
33 | 33 |
34 # https://crbug.com/441916 | 34 # https://crbug.com/441916 |
35 if (is_linux || is_mac) { | 35 if (is_android || is_linux || is_mac) { |
36 cflags += [ | 36 cflags += [ |
37 "-Xclang", | 37 "-Xclang", |
38 "-plugin-arg-find-bad-constructs", | 38 "-plugin-arg-find-bad-constructs", |
39 "-Xclang", | 39 "-Xclang", |
40 "check-templates", | 40 "check-templates", |
41 ] | 41 ] |
42 } | 42 } |
43 | 43 |
44 cflags += [ | 44 cflags += [ |
45 "-Xclang", | 45 "-Xclang", |
46 "-add-plugin", | 46 "-add-plugin", |
47 "-Xclang", | 47 "-Xclang", |
48 "find-bad-constructs", | 48 "find-bad-constructs", |
49 ] | 49 ] |
50 } | 50 } |
51 } | 51 } |
52 | 52 |
53 # Enables some extra Clang-specific warnings. Some third-party code won't | 53 # Enables some extra Clang-specific warnings. Some third-party code won't |
54 # compile with these so may want to remove this config. | 54 # compile with these so may want to remove this config. |
55 config("extra_warnings") { | 55 config("extra_warnings") { |
56 cflags = [ | 56 cflags = [ |
57 "-Wheader-hygiene", | 57 "-Wheader-hygiene", |
58 | 58 |
59 # Warns when a const char[] is converted to bool. | 59 # Warns when a const char[] is converted to bool. |
60 "-Wstring-conversion", | 60 "-Wstring-conversion", |
61 ] | 61 ] |
62 } | 62 } |
OLD | NEW |