Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: build/config/clang/BUILD.gn

Issue 1665363002: Clang plugin to check that unstable types are not used in IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typos Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
11 # On Windows, the plugin is built directly into clang, so there's 11 # On Windows, the plugin is built directly into clang, so there's
12 # no need to load it dynamically. 12 # no need to load it dynamically.
13 13
14 if (is_mac || is_ios) { 14 if (is_mac || is_ios) {
15 cflags += [ 15 cflags += [
16 "-Xclang", 16 "-Xclang",
17 "-load", 17 "-load",
18 "-Xclang", 18 "-Xclang",
19 rebase_path( 19 rebase_path(
20 "//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.d ylib", 20 "//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.d ylib",
21 root_build_dir), 21 root_build_dir),
22 ] 22 ]
23 } else if (is_linux) { 23 } else if (is_linux || is_android) {
24 cflags += [ 24 cflags += [
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 cflags += [ 34 cflags += [
35 "-Xclang", 35 "-Xclang",
36 "-add-plugin", 36 "-add-plugin",
37 "-Xclang", 37 "-Xclang",
38 "find-bad-constructs", 38 "find-bad-constructs",
39 "-Xclang", 39 "-Xclang",
40 "-plugin-arg-find-bad-constructs", 40 "-plugin-arg-find-bad-constructs",
41 "-Xclang", 41 "-Xclang",
42 "check-templates", 42 "check-templates",
43 "-Xclang", 43 "-Xclang",
44 "-plugin-arg-find-bad-constructs", 44 "-plugin-arg-find-bad-constructs",
45 "-Xclang", 45 "-Xclang",
46 "follow-macro-expansion", 46 "follow-macro-expansion",
47 ] 47 ]
48
49 if (is_android) {
50 cflags += [
51 "-Xclang",
52 "-plugin-arg-find-bad-constructs",
53 "-Xclang",
54 "check-ipc",
55 ]
56 }
48 } 57 }
49 } 58 }
50 59
51 # Enables some extra Clang-specific warnings. Some third-party code won't 60 # Enables some extra Clang-specific warnings. Some third-party code won't
52 # compile with these so may want to remove this config. 61 # compile with these so may want to remove this config.
53 config("extra_warnings") { 62 config("extra_warnings") {
54 cflags = [ 63 cflags = [
55 "-Wheader-hygiene", 64 "-Wheader-hygiene",
56 65
57 # Warns when a const char[] is converted to bool. 66 # Warns when a const char[] is converted to bool.
58 "-Wstring-conversion", 67 "-Wstring-conversion",
59 ] 68 ]
60 } 69 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698