| 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 = [] |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 rebase_path("${clang_base_path}/lib/libFindBadConstructs.so", | 28 rebase_path("${clang_base_path}/lib/libFindBadConstructs.so", |
| 29 root_build_dir), | 29 root_build_dir), |
| 30 ] | 30 ] |
| 31 } | 31 } |
| 32 | 32 |
| 33 cflags += [ | 33 cflags += [ |
| 34 "-Xclang", | 34 "-Xclang", |
| 35 "-add-plugin", | 35 "-add-plugin", |
| 36 "-Xclang", | 36 "-Xclang", |
| 37 "find-bad-constructs", | 37 "find-bad-constructs", |
| 38 "-Xclang", |
| 39 "-plugin-arg-find-bad-constructs", |
| 40 "-Xclang", |
| 41 "check-auto-raw-pointer", |
| 38 ] | 42 ] |
| 39 | 43 |
| 40 # TODO(vmpstr): We need to enable this everywhere. crbug.com/554600 | |
| 41 if (is_linux && !is_chromeos && !is_chromecast) { | |
| 42 cflags += [ | |
| 43 "-Xclang", | |
| 44 "-plugin-arg-find-bad-constructs", | |
| 45 "-Xclang", | |
| 46 "check-auto-raw-pointer", | |
| 47 ] | |
| 48 } | |
| 49 | |
| 50 if ((is_linux || is_android) && !is_chromecast) { | 44 if ((is_linux || is_android) && !is_chromecast) { |
| 51 cflags += [ | 45 cflags += [ |
| 52 "-Xclang", | 46 "-Xclang", |
| 53 "-plugin-arg-find-bad-constructs", | 47 "-plugin-arg-find-bad-constructs", |
| 54 "-Xclang", | 48 "-Xclang", |
| 55 "check-ipc", | 49 "check-ipc", |
| 56 ] | 50 ] |
| 57 } | 51 } |
| 58 } | 52 } |
| 59 } | 53 } |
| 60 | 54 |
| 61 # Enables some extra Clang-specific warnings. Some third-party code won't | 55 # Enables some extra Clang-specific warnings. Some third-party code won't |
| 62 # compile with these so may want to remove this config. | 56 # compile with these so may want to remove this config. |
| 63 config("extra_warnings") { | 57 config("extra_warnings") { |
| 64 cflags = [ | 58 cflags = [ |
| 65 "-Wheader-hygiene", | 59 "-Wheader-hygiene", |
| 66 | 60 |
| 67 # Warns when a const char[] is converted to bool. | 61 # Warns when a const char[] is converted to bool. |
| 68 "-Wstring-conversion", | 62 "-Wstring-conversion", |
| 69 | 63 |
| 70 "-Wtautological-overlap-compare", | 64 "-Wtautological-overlap-compare", |
| 71 ] | 65 ] |
| 72 } | 66 } |
| OLD | NEW |