| 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 |
| 11 echo "ThreadSanitizer is not supported on Mac OS X 10.6 yet." >&2 | 11 echo "ThreadSanitizer is not fully supported on Mac OS X 10.6 yet." >&2 |
| 12 echo "See http://code.google.com/p/data-race-test/issues/detail?id=44" >&2 | 12 echo "See http://code.google.com/p/data-race-test/issues/detail?id=44" >&2 |
| 13 exit 1 | |
| 14 fi | 13 fi |
| 15 | 14 |
| 16 POST_BUILD_HOOK_DEFINED=yes | 15 POST_BUILD_HOOK_DEFINED=yes |
| 17 post_build_hook() { | 16 post_build_hook() { |
| 18 PLATFORM=$1 | 17 PLATFORM=$1 |
| 19 cd "$THISDIR/tsan/tsan" | 18 cd "$THISDIR/tsan/tsan" |
| 20 | 19 |
| 21 SPECIAL_TARGET= | 20 SPECIAL_TARGET= |
| 22 SPECIAL_FLAGS= | 21 SPECIAL_FLAGS= |
| 23 # We can build two target architectures on a Linux x64 machine, so we should | 22 # We can build two target architectures on a Linux x64 machine, so we should |
| (...skipping 14 matching lines...) Expand all Loading... |
| 38 VALGRIND_ROOT="$VG_TSAN_DIR" $SPECIAL_TARGET | 37 VALGRIND_ROOT="$VG_TSAN_DIR" $SPECIAL_TARGET |
| 39 | 38 |
| 40 OUT_BIN="$ORIG_BINARIES_DIR/$PLATFORM/bin" | 39 OUT_BIN="$ORIG_BINARIES_DIR/$PLATFORM/bin" |
| 41 mkdir -p "$OUT_BIN" | 40 mkdir -p "$OUT_BIN" |
| 42 # See below for the definition of ORIG_BINARIES_DIR | 41 # See below for the definition of ORIG_BINARIES_DIR |
| 43 "$THISDIR/tsan/tsan/mk-self-contained-valgrind.sh" \ | 42 "$THISDIR/tsan/tsan/mk-self-contained-valgrind.sh" \ |
| 44 "$VG_TSAN_DIR/out/$PLATFORM" "tsan" \ | 43 "$VG_TSAN_DIR/out/$PLATFORM" "tsan" \ |
| 45 "$OUT_BIN/valgrind-tsan.sh" | 44 "$OUT_BIN/valgrind-tsan.sh" |
| 46 } | 45 } |
| 47 | 46 |
| 48 TSAN_REV=2386 | 47 TSAN_REV=2397 |
| 49 TSAN_DIR="$THISDIR/tsan" # Directory to checkout TSan sources | 48 TSAN_DIR="$THISDIR/tsan" # Directory to checkout TSan sources |
| 50 rm -rf "$TSAN_DIR" | 49 rm -rf "$TSAN_DIR" |
| 51 svn co -r "$TSAN_REV" http://data-race-test.googlecode.com/svn/trunk "$TSAN_DIR" | 50 svn co -r "$TSAN_REV" http://data-race-test.googlecode.com/svn/trunk "$TSAN_DIR" |
| 52 | 51 |
| 53 VG_TSAN_DIR="$THISDIR/valgrind" # Directory to checkout Valgrind sources | 52 VG_TSAN_DIR="$THISDIR/valgrind" # Directory to checkout Valgrind sources |
| 54 sh tsan/third_party/update_valgrind.sh # Fetch sources from valgrind-variant | 53 sh tsan/third_party/update_valgrind.sh # Fetch sources from valgrind-variant |
| 55 | 54 |
| 56 cd "$VG_TSAN_DIR" | 55 cd "$VG_TSAN_DIR" |
| 57 | 56 |
| 58 if [ `uname -s` == "Darwin" ] | 57 if [ `uname -s` == "Darwin" ] |
| (...skipping 18 matching lines...) Expand all Loading... |
| 77 fi | 76 fi |
| 78 fi | 77 fi |
| 79 fi | 78 fi |
| 80 | 79 |
| 81 # Ugly hack! | 80 # Ugly hack! |
| 82 # We build Valrgind binaries in the $VG_TSAN_DIR/out and then pack | 81 # 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 | 82 # them into self-contained .sh file into $ORIG_BINARIES_DIR/$PLATFORM |
| 84 ORIG_BINARIES_DIR="$BINARIES_DIR" | 83 ORIG_BINARIES_DIR="$BINARIES_DIR" |
| 85 BINARIES_DIR="$VG_TSAN_DIR/out" | 84 BINARIES_DIR="$VG_TSAN_DIR/out" |
| 86 build_valgrind_for_available_platforms | 85 build_valgrind_for_available_platforms |
| OLD | NEW |