From ba9e2718bc5f939c24c588095bd57feeeb5bc83b Mon Sep 17 00:00:00 2001 From: "thakis@chromium.org" Date: Thu, 10 Feb 2011 19:57:28 +0000 Subject: clang: Compille the style checker plugin on the bots. BUG=none TEST=none Review URL: http://codereview.chromium.org/6484004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74464 0039d316-1c4b-4281-b951-d872f2087c98 --- tools/clang/plugins/Makefile | 17 ++++++++--------- tools/clang/scripts/update.sh | 13 +++++++++++++ 2 files changed, 21 insertions(+), 9 deletions(-) (limited to 'tools') diff --git a/tools/clang/plugins/Makefile b/tools/clang/plugins/Makefile index 1aa1280..63cb9e6 100644 --- a/tools/clang/plugins/Makefile +++ b/tools/clang/plugins/Makefile @@ -2,19 +2,18 @@ # Makefile, you should execute the following commands to copy this directory # into a clang checkout: # -# cp -R /path/to/clang/examples/chromeplugin -# cd /path/to/clang/examples/chromeplugin -# make -# -# You can't just link the directories, or specify clang as a full path for some -# reason. :( -# -# TODO(thakis): Improve the situation. +# cp -R third_party/llvm-build/tools/clang/tools/chrome-plugin +# cd third_party/llvm-build/tools/clang/tools/chrome-plugin +# make CLANG_LEVEL := ../.. LIBRARYNAME = FindBadConstructs -LINK_LIBS_IN_SHARED = 1 +LINK_LIBS_IN_SHARED = 0 SHARED_LIBRARY = 1 include $(CLANG_LEVEL)/Makefile + +ifeq ($(OS),Darwin) + LDFLAGS=-Wl,-undefined,dynamic_lookup +endif diff --git a/tools/clang/scripts/update.sh b/tools/clang/scripts/update.sh index a47bedb..b8508ca 100755 --- a/tools/clang/scripts/update.sh +++ b/tools/clang/scripts/update.sh @@ -17,6 +17,8 @@ set -e # Echo all commands. set -x +# Build clang. + # Check out. svn co --force http://llvm.org/svn/llvm-project/llvm/trunk@$CLANG_REVISION $LLVM_DIR svn co --force http://llvm.org/svn/llvm-project/cfe/trunk@$CLANG_REVISION $CLANG_DIR @@ -31,3 +33,14 @@ cd $LLVM_DIR/../llvm-build # some grepping of /proc/cpuinfo on linux). make -j3 cd - + +# Build plugin. +# Copy it into the clang tree and use clang's build system to compile the +# plugin. +PLUGIN_SRC_DIR=$THIS_DIR/../plugins +PLUGIN_DST_DIR=$LLVM_DIR/../llvm-build/tools/clang/tools/chrome-plugin +rm -rf $PLUGIN_DST_DIR +cp -R $PLUGIN_SRC_DIR $PLUGIN_DST_DIR +cd $PLUGIN_DST_DIR +make -j3 +cd - -- cgit v1.1