strip our binaries

on linux, building the packages did this but we're not doing this any more.

i got the linux line from 'dh_strip' and the mac line from 'man strip'
This commit is contained in:
David Glasser
2013-02-08 13:50:18 -08:00
parent dea41c3e01
commit a60dfc1684

View File

@@ -15,6 +15,9 @@ if [ "$UNAME" == "Linux" ] ; then
fi
MONGO_OS="linux"
stripBinary() {
strip --remove-section=.comment --remove-section=.note $1
}
elif [ "$UNAME" == "Darwin" ] ; then
SYSCTL_64BIT=$(sysctl -n hw.cpu64bit_capable 2>/dev/null || echo 0)
if [ "$ARCH" == "i386" -a "1" != "$SYSCTL_64BIT" ] ; then
@@ -31,6 +34,10 @@ elif [ "$UNAME" == "Darwin" ] ; then
fi
MONGO_OS="osx"
stripBinary() {
strip -u -r $1
}
else
echo "This OS not yet supported"
exit 1
@@ -141,6 +148,9 @@ cd mongodb/bin
rm bsondump mongodump mongoexport mongofiles mongoimport mongorestore mongos mongosniff mongostat mongotop mongooplog mongoperf
cd ../..
stripBinary bin/node
stripBinary mongodb/bin/mongo
stripBinary mongodb/bin/mongod
echo BUNDLING