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") | 6 import("//build/config/chromecast_build.gni") |
7 | 7 |
8 config("find_bad_constructs") { | 8 config("find_bad_constructs") { |
9 if (clang_use_chrome_plugins) { | 9 if (clang_use_chrome_plugins) { |
10 cflags = [] | 10 cflags = [] |
11 | 11 |
12 # On Windows, the plugin is built directly into clang, so there's | 12 # On Windows, the plugin is built directly into clang, so there's |
13 # no need to load it dynamically. | 13 # no need to load it dynamically. |
14 | 14 |
15 if (is_mac || is_ios) { | 15 if (is_mac || is_ios) { |
16 cflags += [ | 16 cflags += [ |
17 "-Xclang", | 17 "-Xclang", |
18 "-load", | 18 "-load", |
19 "-Xclang", | 19 "-Xclang", |
20 rebase_path( | 20 rebase_path("${clang_base_path}/lib/libFindBadConstructs.dylib", |
21 "//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.d
ylib", | 21 root_build_dir), |
22 root_build_dir), | |
23 ] | 22 ] |
24 } else if (is_linux || is_android) { | 23 } else if (is_linux || is_android) { |
25 cflags += [ | 24 cflags += [ |
26 "-Xclang", | 25 "-Xclang", |
27 "-load", | 26 "-load", |
28 "-Xclang", | 27 "-Xclang", |
29 rebase_path( | 28 rebase_path("${clang_base_path}/lib/libFindBadConstructs.so", |
30 "//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.s
o", | 29 root_build_dir), |
31 root_build_dir), | |
32 ] | 30 ] |
33 } | 31 } |
34 | 32 |
35 cflags += [ | 33 cflags += [ |
36 "-Xclang", | 34 "-Xclang", |
37 "-add-plugin", | 35 "-add-plugin", |
38 "-Xclang", | 36 "-Xclang", |
39 "find-bad-constructs", | 37 "find-bad-constructs", |
40 "-Xclang", | 38 "-Xclang", |
41 "-plugin-arg-find-bad-constructs", | 39 "-plugin-arg-find-bad-constructs", |
(...skipping 23 matching lines...) Expand all Loading... |
65 # Enables some extra Clang-specific warnings. Some third-party code won't | 63 # Enables some extra Clang-specific warnings. Some third-party code won't |
66 # compile with these so may want to remove this config. | 64 # compile with these so may want to remove this config. |
67 config("extra_warnings") { | 65 config("extra_warnings") { |
68 cflags = [ | 66 cflags = [ |
69 "-Wheader-hygiene", | 67 "-Wheader-hygiene", |
70 | 68 |
71 # Warns when a const char[] is converted to bool. | 69 # Warns when a const char[] is converted to bool. |
72 "-Wstring-conversion", | 70 "-Wstring-conversion", |
73 ] | 71 ] |
74 } | 72 } |
OLD | NEW |