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 # Script to build ThreadSanitizer binaries for use with chromium | 7 # Script to build ThreadSanitizer binaries for use with chromium |
8 source common.sh | 8 source common.sh |
9 if system_is_snow_leopard | 9 if system_is_snow_leopard |
10 then | 10 then |
(...skipping 20 matching lines...) Expand all Loading... |
31 SPECIAL_FLAGS="OUTDIR=out32" | 31 SPECIAL_FLAGS="OUTDIR=out32" |
32 SPECIAL_TARGET="l32" | 32 SPECIAL_TARGET="l32" |
33 ;; | 33 ;; |
34 esac | 34 esac |
35 | 35 |
36 make -j4 $SPECIAL_FLAGS OFFLINE= PIN_ROOT= \ | 36 make -j4 $SPECIAL_FLAGS OFFLINE= PIN_ROOT= \ |
37 VALGRIND_INST_ROOT="$BINARIES_DIR/$PLATFORM" \ | 37 VALGRIND_INST_ROOT="$BINARIES_DIR/$PLATFORM" \ |
38 VALGRIND_ROOT="$VG_TSAN_DIR" $SPECIAL_TARGET | 38 VALGRIND_ROOT="$VG_TSAN_DIR" $SPECIAL_TARGET |
39 | 39 |
40 OUT_BIN="$ORIG_BINARIES_DIR/$PLATFORM/bin" | 40 OUT_BIN="$ORIG_BINARIES_DIR/$PLATFORM/bin" |
41 mkdir -p $OUT_BIN | 41 mkdir -p "$OUT_BIN" |
42 # See below for the definition of ORIG_BINARIES_DIR | 42 # See below for the definition of ORIG_BINARIES_DIR |
43 $THISDIR/tsan/tsan/mk-self-contained-valgrind.sh \ | 43 "$THISDIR/tsan/tsan/mk-self-contained-valgrind.sh" \ |
44 "$VG_TSAN_DIR/out/$PLATFORM" "tsan" \ | 44 "$VG_TSAN_DIR/out/$PLATFORM" "tsan" \ |
45 "$OUT_BIN/valgrind-tsan.sh" | 45 "$OUT_BIN/valgrind-tsan.sh" |
46 } | 46 } |
47 | 47 |
48 TSAN_REV=2386 | 48 TSAN_REV=2386 |
49 TSAN_DIR="$THISDIR/tsan" # Directory to checkout TSan sources | 49 TSAN_DIR="$THISDIR/tsan" # Directory to checkout TSan sources |
50 rm -rf $TSAN_DIR | 50 rm -rf "$TSAN_DIR" |
51 svn co -r "$TSAN_REV" http://data-race-test.googlecode.com/svn/trunk $TSAN_DIR | 51 svn co -r "$TSAN_REV" http://data-race-test.googlecode.com/svn/trunk "$TSAN_DIR" |
52 | 52 |
53 VG_TSAN_DIR="$THISDIR/valgrind" # Directory to checkout Valgrind sources | 53 VG_TSAN_DIR="$THISDIR/valgrind" # Directory to checkout Valgrind sources |
54 sh tsan/third_party/update_valgrind.sh # Fetch sources from valgrind-variant | 54 sh tsan/third_party/update_valgrind.sh # Fetch sources from valgrind-variant |
55 | 55 |
56 cd "$VG_TSAN_DIR" | 56 cd "$VG_TSAN_DIR" |
57 | 57 |
58 if [ `uname -s` == "Darwin" ] | 58 if [ `uname -s` == "Darwin" ] |
59 then | 59 then |
60 if ls /opt/local/bin/ | grep "^gcc-mp-4\.4" >/dev/null | 60 if ls /opt/local/bin/ | grep "^gcc-mp-4\.4" >/dev/null |
61 then | 61 then |
(...skipping 12 matching lines...) Expand all Loading... |
74 if [ "$CONFIRMATION" != "y" ] | 74 if [ "$CONFIRMATION" != "y" ] |
75 then | 75 then |
76 exit 1 | 76 exit 1 |
77 fi | 77 fi |
78 fi | 78 fi |
79 fi | 79 fi |
80 | 80 |
81 # Ugly hack! | 81 # Ugly hack! |
82 # We build Valrgind binaries in the $VG_TSAN_DIR/out and then pack | 82 # We build Valrgind binaries in the $VG_TSAN_DIR/out and then pack |
83 # them into self-contained .sh file into $ORIG_BINARIES_DIR/$PLATFORM | 83 # them into self-contained .sh file into $ORIG_BINARIES_DIR/$PLATFORM |
84 ORIG_BINARIES_DIR=$BINARIES_DIR | 84 ORIG_BINARIES_DIR="$BINARIES_DIR" |
85 BINARIES_DIR="$VG_TSAN_DIR/out" | 85 BINARIES_DIR="$VG_TSAN_DIR/out" |
86 build_valgrind_for_available_platforms | 86 build_valgrind_for_available_platforms |
OLD | NEW |