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 "-Xclang", "-load", | 10 "-Xclang", |
| 11 "-load", |
11 "-Xclang", | 12 "-Xclang", |
12 ] | 13 ] |
13 | 14 |
14 if (is_mac || is_ios) { | 15 if (is_mac || is_ios) { |
15 cflags += [ rebase_path( | 16 cflags += [ rebase_path( |
16 "//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib
", | 17 "//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs
.dylib", |
17 root_build_dir) ] | 18 root_build_dir) ] |
18 } else if (is_linux) { | 19 } else if (is_linux) { |
19 cflags += [ rebase_path( | 20 cflags += [ rebase_path( |
20 "//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so", | 21 "//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs
.so", |
21 root_build_dir) ] | 22 root_build_dir) ] |
22 } | 23 } |
23 | 24 |
24 cflags += [ | 25 cflags += [ |
25 "-Xclang", "-add-plugin", | 26 "-Xclang", |
26 "-Xclang", "find-bad-constructs", | 27 "-add-plugin", |
| 28 "-Xclang", |
| 29 "find-bad-constructs", |
27 ] | 30 ] |
28 } | 31 } |
29 } | 32 } |
30 | 33 |
31 # Enables some extra Clang-specific warnings. Some third-party code won't | 34 # Enables some extra Clang-specific warnings. Some third-party code won't |
32 # compile with these so may want to remove this config. | 35 # compile with these so may want to remove this config. |
33 config("extra_warnings") { | 36 config("extra_warnings") { |
34 cflags = [ | 37 cflags = [ |
35 "-Wheader-hygiene", | 38 "-Wheader-hygiene", |
36 | 39 |
37 # Warns when a const char[] is converted to bool. | 40 # Warns when a const char[] is converted to bool. |
38 "-Wstring-conversion", | 41 "-Wstring-conversion", |
39 ] | 42 ] |
40 } | 43 } |
OLD | NEW |