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 declare_args() { | 5 declare_args() { |
6 # Indicates if the build should use the Chrome-specific plugins for enforcing | 6 # Indicates if the build should use the Chrome-specific plugins for enforcing |
7 # coding guidelines, etc. | 7 # coding guidelines, etc. |
8 clang_use_chrome_plugins = true | 8 clang_use_chrome_plugins = true |
9 } | 9 } |
10 | 10 |
11 config("find_bad_constructs") { | 11 config("find_bad_constructs") { |
12 if (clang_use_chrome_plugins) { | 12 if (clang_use_chrome_plugins) { |
13 cflags = [ | 13 cflags = [ |
14 "-Xclang", "-load", | 14 "-Xclang", "-load", |
15 "-Xclang", | 15 "-Xclang", |
16 ] | 16 ] |
17 | 17 |
18 if (is_mac || is_ios) { | 18 if (is_mac) { |
19 cflags += [ rebase_path( | 19 cflags += [ rebase_path( |
20 "//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib
", | 20 "//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib
", |
21 ".", root_build_dir) ] | 21 ".", root_build_dir) ] |
22 } else if (is_linux) { | 22 } else if (is_linux) { |
23 cflags += [ rebase_path( | 23 cflags += [ rebase_path( |
24 "//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so", | 24 "//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so", |
25 ".", root_build_dir) ] | 25 ".", root_build_dir) ] |
26 } | 26 } |
27 | 27 |
28 cflags += [ | 28 cflags += [ |
29 "-Xclang", "-add-plugin", | 29 "-Xclang", "-add-plugin", |
30 "-Xclang", "find-bad-constructs", | 30 "-Xclang", "find-bad-constructs", |
31 ] | 31 ] |
32 } | 32 } |
33 } | 33 } |
OLD | NEW |