190dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)# Copyright (c) 2013 The Chromium Authors. All rights reserved.
290dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)# Use of this source code is governed by a BSD-style license that can be
390dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)# found in the LICENSE file.
490dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)
590dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)config("find_bad_constructs") {
690dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)  cflags = [
790dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)    "-Xclang", "-load",
890dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)    "-Xclang",
93d4dfb6f11fb4e934d658743a8efc26d5490fdb0Ben Murdoch
103d4dfb6f11fb4e934d658743a8efc26d5490fdb0Ben Murdoch    # TODO(brettw) express this in terms of a relative dir from the output.
1190dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)    # for now, assume the output dir is two levels deep under the source
1290dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)    # (like "out/Debug").
1390dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)    "../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib",
1490dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)
1590dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)    "-Xclang", "-add-plugin",
16a36e5920737c6adbddd3e43b760e5de8431db6e0Torne (Richard Coles)    "-Xclang", "find-bad-constructs",
1790dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)  ]
1890dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)}
1990dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)