michael@0: #!/bin/bash michael@0: # Copyright (c) 2012 The Chromium Authors. All rights reserved. michael@0: # Use of this source code is governed by a BSD-style license that can be michael@0: # found in the LICENSE file. michael@0: michael@0: # This script returns the flags that should be used when GYP_DEFINES contains michael@0: # clang_use_chrome_plugins. The flags are stored in a script so that they can michael@0: # be changed on the bots without requiring a master restart. michael@0: michael@0: THIS_ABS_DIR=$(cd $(dirname $0) && echo $PWD) michael@0: CLANG_LIB_PATH=$THIS_ABS_DIR/../../../third_party/llvm-build/Release+Asserts/lib michael@0: michael@0: if uname -s | grep -q Darwin; then michael@0: LIBSUFFIX=dylib michael@0: else michael@0: LIBSUFFIX=so michael@0: fi michael@0: michael@0: echo -Xclang -load -Xclang $CLANG_LIB_PATH/libFindBadConstructs.$LIBSUFFIX \ michael@0: -Xclang -add-plugin -Xclang find-bad-constructs \ michael@0: -Xclang -plugin-arg-find-bad-constructs \ michael@0: -Xclang skip-virtuals-in-implementations \ michael@0: -Xclang -plugin-arg-find-bad-constructs \ michael@0: -Xclang check-cc-directory