summaryrefslogtreecommitdiff
path: root/chromium/tools/clang/scripts/plugin_flags.sh
blob: 41c25c806d3db18231b6d105debd27c630155c4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bash
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# This script returns the flags that should be used when GYP_DEFINES contains
# clang_use_chrome_plugins. The flags are stored in a script so that they can
# be changed on the bots without requiring a master restart.

SRC_ABS_DIR=$(cd $(dirname $0)/../../.. && echo $PWD)
CLANG_LIB_PATH=$SRC_ABS_DIR/third_party/llvm-build/Release+Asserts/lib

if uname -s | grep -q Darwin; then
  LIBSUFFIX=dylib
else
  LIBSUFFIX=so
fi

echo -Xclang -load -Xclang $CLANG_LIB_PATH/libFindBadConstructs.$LIBSUFFIX \
  -Xclang -add-plugin -Xclang find-bad-constructs