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

Side by Side Diff: scripts/common.sh

Issue 9372099: Allow building OS X 10.7 binaries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/valgrind/
Patch Set: Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « scripts/build-memcheck-for-chromium.sh ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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}")
11 THISDIR=$(cd "${THISDIR}" && /bin/pwd) 11 THISDIR=$(cd "${THISDIR}" && /bin/pwd)
12 VG_SRC_DIR=/tmp/valgrind-src 12 VG_SRC_DIR=/tmp/valgrind-src
13 13
14 system_is_snow_leopard() { 14 system_is_snow_leopard() {
15 uname -r | grep 10\.[0-9]\.[0-9] >/dev/null 15 uname -r | grep 10\.[0-9]\.[0-9] >/dev/null
16 } 16 }
17 17
18 system_is_lion() {
19 uname -r | grep 11\.[0-9]\.[0-9] >/dev/null
20 }
21
18 checkout_and_patch_valgrind_variant() { 22 checkout_and_patch_valgrind_variant() {
19 # $1 = Valgrind-variant revision 23 # $1 = Valgrind-variant revision
20 # $2 = source dir 24 # $2 = source dir
21 # Checkout Valgrind, apply our patches to Valgrind. 25 # Checkout Valgrind, apply our patches to Valgrind.
22 # The source will be put in $VG_SRC_DIR/valgrind-source 26 # The source will be put in $VG_SRC_DIR/valgrind-source
23 mkdir -p "$VG_SRC_DIR" 27 mkdir -p "$VG_SRC_DIR"
24 cd "$VG_SRC_DIR" 28 cd "$VG_SRC_DIR"
25 VG_REV="$1" 29 VG_REV="$1"
26 SOURCE_DIR="$2" 30 SOURCE_DIR="$2"
27 SVN_URI="http://valgrind-variant.googlecode.com/svn/trunk" 31 SVN_URI="http://valgrind-variant.googlecode.com/svn/trunk"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 build_valgrind "linux_x64" 155 build_valgrind "linux_x64"
152 build_valgrind "linux_x86" "--enable-only32bit" 156 build_valgrind "linux_x86" "--enable-only32bit"
153 ;; 157 ;;
154 "Darwin i386") 158 "Darwin i386")
155 if uname -r | grep 9\.[0-9]\.[0-9] >/dev/null 159 if uname -r | grep 9\.[0-9]\.[0-9] >/dev/null
156 then 160 then
157 build_valgrind "mac" 161 build_valgrind "mac"
158 elif system_is_snow_leopard 162 elif system_is_snow_leopard
159 then 163 then
160 build_valgrind "mac_10.6" "--build=amd64-darwin" 164 build_valgrind "mac_10.6" "--build=amd64-darwin"
165 elif system_is_lion
166 then
167 build_valgrind "mac_10.7"
161 else 168 else
162 echo "You have Darwin kernel different from 9.X.X or 10.X.X" >&2 169 echo "You have Darwin kernel different from 9.X.X--11.X.X" >&2
170 echo "Please, don't put the resulting binaries into Chromium SVN" >&2
171 build_valgrind "local"
172 fi
173 ;;
174 "Darwin x86_64")
175 if system_is_lion
176 then
177 build_valgrind "mac_10.7"
178 else
179 echo "You have Darwin kernel different from 11.X.X" >&2
163 echo "Please, don't put the resulting binaries into Chromium SVN" >&2 180 echo "Please, don't put the resulting binaries into Chromium SVN" >&2
164 build_valgrind "local" 181 build_valgrind "local"
165 fi 182 fi
166 ;; 183 ;;
167 *) 184 *)
168 build_valgrind "local" 185 build_valgrind "local"
169 ;; 186 ;;
170 esac 187 esac
171 } 188 }
172 189
173 # Check that the binaries directory exists. 190 # Check that the binaries directory exists.
174 BINARIES_DIR="$THISDIR/../binaries" 191 BINARIES_DIR="$THISDIR/../binaries"
175 if ! [ -a "$BINARIES_DIR" ] 192 if ! [ -a "$BINARIES_DIR" ]
176 then 193 then
177 echo "Error: $BINARIES_DIR doesn't exist!" >&2 194 echo "Error: $BINARIES_DIR doesn't exist!" >&2
178 exit 1 195 exit 1
179 fi 196 fi
180 197
181 set -e 198 set -e
182 set -x 199 set -x
OLDNEW
« no previous file with comments | « scripts/build-memcheck-for-chromium.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698