OLD | NEW |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 | 2 |
3 # Copyright (c) 2009-2010 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2009-2010 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # This script contains some functions useful to build | 7 # This script contains some functions useful to build |
8 # Valgrind and ThreadSanitizer for use with chromium | 8 # Valgrind and ThreadSanitizer for use with chromium |
9 | 9 |
10 THISDIR=$(dirname "${0}") | 10 THISDIR=$(dirname "${0}") |
(...skipping 14 matching lines...) Expand all Loading... | |
25 VG_REV="$1" | 25 VG_REV="$1" |
26 SOURCE_DIR="$2" | 26 SOURCE_DIR="$2" |
27 SVN_URI="http://valgrind-variant.googlecode.com/svn/trunk" | 27 SVN_URI="http://valgrind-variant.googlecode.com/svn/trunk" |
28 | 28 |
29 test -d "$SOURCE_DIR" && rm -rf "$SOURCE_DIR" | 29 test -d "$SOURCE_DIR" && rm -rf "$SOURCE_DIR" |
30 mkdir "$SOURCE_DIR" | 30 mkdir "$SOURCE_DIR" |
31 | 31 |
32 # Check out latest version that following patches known to apply against | 32 # Check out latest version that following patches known to apply against |
33 svn co -r "$VG_REV" "$SVN_URI" "$SOURCE_DIR" | 33 svn co -r "$VG_REV" "$SVN_URI" "$SOURCE_DIR" |
34 cd $SOURCE_DIR/valgrind | 34 cd $SOURCE_DIR/valgrind |
35 | |
36 # Add intercepts for tcmalloc memory functions. | |
37 # The corresponding feature request for Valgrind is at | |
38 # https://bugs.kde.org/show_bug.cgi?id=219156. | |
39 patch -p0 -i "${THISDIR}/intercept_tcmalloc.patch" | |
Timur Iskhodzhanov
2010/10/29 09:06:10
Don't you need to still apply this for Memcheck?
Alexander Potapenko
2010/10/29 11:43:02
This function builds valgrind-variant, which alrea
| |
40 # }}} | |
41 } | 35 } |
42 | 36 |
43 checkout_and_patch_valgrind() { | 37 checkout_and_patch_valgrind() { |
44 # $1 = Valgrind revision | 38 # $1 = Valgrind revision |
45 # $2 = VEX revision | 39 # $2 = VEX revision |
46 # $3 = source dir | 40 # $3 = source dir |
47 # Checkout Valgrind, apply our patches to Valgrind. | 41 # Checkout Valgrind, apply our patches to Valgrind. |
48 # The source will be put in $VG_SRC_DIR/valgrind-source | 42 # The source will be put in $VG_SRC_DIR/valgrind-source |
49 mkdir -p "$VG_SRC_DIR" | 43 mkdir -p "$VG_SRC_DIR" |
50 cd "$VG_SRC_DIR" | 44 cd "$VG_SRC_DIR" |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
257 # Check that the binaries directory exists. | 251 # Check that the binaries directory exists. |
258 BINARIES_DIR="$THISDIR/../binaries" | 252 BINARIES_DIR="$THISDIR/../binaries" |
259 if ! [ -a "$BINARIES_DIR" ] | 253 if ! [ -a "$BINARIES_DIR" ] |
260 then | 254 then |
261 echo "Error: $BINARIES_DIR doesn't exist!" >&2 | 255 echo "Error: $BINARIES_DIR doesn't exist!" >&2 |
262 exit 1 | 256 exit 1 |
263 fi | 257 fi |
264 | 258 |
265 set -e | 259 set -e |
266 set -x | 260 set -x |
OLD | NEW |