diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-10 19:57:28 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-10 19:57:28 +0000 |
commit | ba9e2718bc5f939c24c588095bd57feeeb5bc83b (patch) | |
tree | 8085184511756fc3b2f7e58069dba9e1502f814d /tools/clang | |
parent | 931cdce9eb550a0799d53f4c31ed02bf8dd69f0c (diff) | |
download | chromium_src-ba9e2718bc5f939c24c588095bd57feeeb5bc83b.zip chromium_src-ba9e2718bc5f939c24c588095bd57feeeb5bc83b.tar.gz chromium_src-ba9e2718bc5f939c24c588095bd57feeeb5bc83b.tar.bz2 |
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
Diffstat (limited to 'tools/clang')
-rw-r--r-- | tools/clang/plugins/Makefile | 17 | ||||
-rwxr-xr-x | tools/clang/scripts/update.sh | 13 |
2 files changed, 21 insertions, 9 deletions
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 <this directory> /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 <this directory> 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 - |