Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(792)

Unified Diff: scripts/build-tsan-for-chromium.sh

Issue 1596015: Use gcc-mp-4.4 to build TSan on Mac.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/valgrind/
Patch Set: '' Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « binaries/mac/bin/valgrind-tsan.sh ('k') | scripts/common.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/build-tsan-for-chromium.sh
===================================================================
--- scripts/build-tsan-for-chromium.sh (revision 43828)
+++ scripts/build-tsan-for-chromium.sh (working copy)
@@ -57,9 +57,31 @@
for P in "$THISDIR"/tsan/valgrind_patches/*.patch
do
patch -p0 -i $P
- echo
done
+if [ `uname -s` == "Darwin" ]
+then
+ if ls /opt/local/bin/ | grep "^gcc-mp-4\.4" >/dev/null
+ then
+ export GCC_BINARY_MASK="/opt/local/bin/XXX-mp-4.4"
+ export PATH="$THISDIR/macports-gcc-wrapper:$PATH"
+ echo "Using gcc-4.4 from MacPorts to build ThreadSanitizer."
+ elif gcc --version | grep " 4\.[0-3]\.[0-9]\| 3\.[0-9]\.[0-9]" >/dev/null
+ then
+ echo "Your gcc version is older than 4.4."
+ echo "It is recommended to use gcc-4.4 from MacPorts for building"
+ echo "ThreadSanitizer, especially if you plan to commit binaries into SVN."
+ echo "See http://gcc44.darwinports.com/ for getting gcc-4.4"
+ echo ""
+ echo -n "Do you want to continue using old gcc? (y/N)"
+ read CONFIRMATION
+ if [ "$CONFIRMATION" != "y" ]
+ then
+ exit 1
+ fi
+ fi
+fi
+
# Ugly hack!
# We build Valrgind binaries in the $VG_TSAN_DIR/out and then pack
# them into self-contained .sh file into $ORIG_BINARIES_DIR/$PLATFORM
« no previous file with comments | « binaries/mac/bin/valgrind-tsan.sh ('k') | scripts/common.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698