Using pre-built binaries from Chromium SVNIn most cases, you don't need to build Valgrind yourself. We already have pre-built Valgrind binaries for Linux and Mac OS 10.5 and 10.6 in SVN. These binaries are not checked out automatically, you need to specify the following rule in your .glient custom_deps section of your src client: { "name" : "src", "url" : <...>, "custom_deps" : { <your old custom_deps here> "src/third_party/valgrind": "http://src.chromium.org/chrome/trunk/deps/third_party/valgrind/binaries", },and then do gclient sync (this will download around 40Mb of binaries).Using pre-built binaries in the git-submodules flowFrom your src directory, run git clone https://chromium.googlesource.com/chromium/deps/valgrind/binaries.git third_party/valgrindThese binaries won't get updated automatically by the sync process, so you'll want to manually ` git pull` them occasionally.Building binaries for local useIf for some reason the binaries from SVN don't work for you, you can build the binaries for your architecture in some local directory.First of all, make sure you have automake installed: sudo apt-get install automake Then, make sure you aren't linking with gold, otherwise the build may fail. If you've set CC/CXX to point to gold, unset them before doing the steps listed below. Then, mkdir valgrind-build-for-chromium # please don't delete this directory cd valgrind-build-for-chromiummkdir binariessvn co http://src.chromium.org/chrome/trunk/deps/third_party/valgrind/scriptscd scriptssh build-valgrind-for-chromium.sh# You should probably read this script to get better understanding of what's happening.These steps may help you to try your local patches to Valgrind if you want to. You'll need to define CHROME_VALGRIND environmental variable pointing to your local build directory before running src/tools/valgrind/chrome_tests.sh OR you can do cd ../binariessudo ln -s local /usr/local/valgrind-10880Updating binaries in the SVNIf you need to update the Valgrind binaries in the SVN (e.g. add a new patch, get a newer version of Valgrind, etc), please do the following on two machines (Linux 64-bit and Mac 10.5): First, make sure you have automake installed (e.g. sudo apt-get automake) Then, mkdir valgrind-for-chromium-clientcd valgrind-for-chromium-clientgclient config svn://.../trunk/deps/third_party/valgrind # use the SVN path provided with your commiter access details.gclient synccd valgrind/scriptssh build-valgrind-for-chromium.sh # this will overwrite some files in valgrind/binaries/<your platform>/cd ../binariessvn status # check that the binaries have changed<commit> You may put valgrind-for-chromium-client directory into a shared network location if you need update the binaries for Linux and Mac at the same time. Please note that the absolute path to valgrind-for-chromium-client will be put into Valgrind binaries! Configuring Valgrind buildbot slaveIf you need to add a new Valgrind slave to the buildbot, please add factory_properties={ 'needs_valgrind' : True, 'gclient_env': { 'GYP_DEFINES' : valgrind_gyp_defines}}) to the slave factory definition in the corresponding master.cfg This will pull Valgrind binaries from SVN (see http://sites.google.com/a/chromium.org/dev/developers/how-tos/using-valgrind/building-valgrind for the details) and some definitions to build Valgrind-friendly Chrome. Please see Memory Waterfall master.cfg for the examples. |
