build/macosx/build-cctools.sh
author Mike Shal <mshal@mozilla.com>
Fri, 30 Sep 2016 11:16:41 -0400
changeset 323499 7a1621d1bea10e135a9c9800f067796cbc02ae9c
parent 308041 6ef9c220c28a22fd5eea8bf124f411bc4788772e
permissions -rwxr-xr-x
Bug 1315810 - Use tup's internal symlinking instead of build manifests; r=chmanchester MozReview-Commit-ID: LNsbghIGJvH

#!/bin/bash

set -e

if ! git remote -v | grep origin | grep -q cctools-port; then
    echo "must be in a cctools-port checkout"
    exit 1
fi

mkdir build-cctools
cd build-cctools

CFLAGS='-mcpu=generic -mtune=generic' MACOSX_DEPLOYMENT_TARGET=10.7 ../cctools/configure --target=x86_64-apple-darwin11
env MACOSX_DEPLOYMENT_TARGET=10.7 make -s -j4

if test ! -e ld64/src/ld/ld; then
    echo "ld did not get built"
    exit 1
fi

gtar jcf cctools.tar.bz2 ld64/src/ld/ld --transform 's#ld64/src/ld#cctools/bin#'

cd ../

echo "build from $(git show --pretty=format:%H -s HEAD) complete!"
echo "upload the build-cctools/cctools.tar.bz2 file to tooltool"