forked from mozilla-services/socorro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-breakpad.sh
executable file
·64 lines (53 loc) · 1.73 KB
/
build-breakpad.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Build script for building Breakpad
# Generally run in Taskcluster, but split out to a separate script
# so it can be run for local builds if necessary without assuming
# the Taskcluster environment.
# any failures in this script should cause the build to fail
set -v -e -x
export MAKEFLAGS
MAKEFLAGS=-j$(getconf _NPROCESSORS_ONLN)
if [ ! -d "depot_tools" ]; then
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
fi
cd depot_tools || exit
git pull origin master
echo "using depot_tools version: $(git rev parse HEAD)"
cd ..
# Breakpad will rely on a bunch of stuff from depot_tools, like fetch
# So we just put it on the path
# see https://chromium.googlesource.com/breakpad/breakpad/+/master/#Getting-started-from-master
export PATH
PATH=$(pwd)/depot_tools:$PATH
# Checkout and build Breakpad
echo "PREFIX: ${PREFIX:=$(pwd)/build/breakpad}"
if [ ! -d "breakpad" ]; then
mkdir breakpad
cd breakpad
fetch breakpad
else
cd breakpad
gclient sync
fi
cd src
echo "using breakpad version: $(git rev parse HEAD)"
mkdir -p "${PREFIX}"
rsync -a --exclude="*.git" ./src "${PREFIX}"/
./configure --prefix="${PREFIX}"
make install
if test -z "${SKIP_CHECK}"; then
#FIXME: get this working again
#make check
true
fi
git rev-parse master > "${PREFIX}"/revision.txt
cd ../..
cp breakpad/src/src/third_party/libdisasm/libdisasm.a "${PREFIX}"/lib/
# Optionally package everything up
if test -z "${SKIP_TAR}"; then
tar -C "${PREFIX}"/.. --mode 755 --owner 0 --group 0 -zcf breakpad.tar.gz "$(basename "${PREFIX}")"
fi