2014-08-13 12:08:26 +01:00
|
|
|
if [ "$1" = "configure" ]
|
|
|
|
then
|
2018-06-21 14:31:17 -04:00
|
|
|
TEMPDIR=`mktemp -d -t monoaot.XXXXXXXXX`
|
2015-02-07 13:54:03 -05:00
|
|
|
MONOARCH=`mono --version | grep Architecture | sed 's/.*: //' | sed 's/el,.*//'`
|
2018-04-24 16:40:34 -04:00
|
|
|
echo "Mono precompiling #FILE# for ${MONOARCH}..."
|
2015-01-13 16:18:26 +00:00
|
|
|
mkdir -p /usr/lib/mono/aot-cache/${MONOARCH}/
|
2018-06-21 14:31:17 -04:00
|
|
|
/usr/bin/mono --aot=try-llvm,temp-path=${TEMPDIR},outfile=/usr/lib/mono/aot-cache/${MONOARCH}/`basename #FILE#.so` -O=all #FILE# > /dev/null 2>&1 || true
|
|
|
|
if [ -n "${TEMPDIR}" -a "${TEMPDIR}" != "/tmp" -a "${TEMPDIR}" != "/tmp/" -a "${TEMPDIR}" != "/" ]
|
|
|
|
then
|
|
|
|
rm -f ${TEMPDIR}/*
|
|
|
|
rmdir ${TEMPDIR}
|
|
|
|
fi
|
2014-08-13 12:08:26 +01:00
|
|
|
fi
|