9dc0f38f38
Former-commit-id: 29304edac690afb6b818d49f817294196ace2801
27 lines
881 B
Plaintext
27 lines
881 B
Plaintext
if [ "$1" = "configure" ]
|
|
then
|
|
TEMPDIR=`mktemp -d -t monoaot.XXXXXXXXX`
|
|
MONOARCH=`mono --version | grep Architecture | sed 's/.*: //' | sed 's/el,.*//'`
|
|
HASSSE41=`grep sse4_1 /proc/cpuinfo || true`
|
|
TRYLLVM=""
|
|
LLVMNOTE=""
|
|
if [ -e "/usr/lib/libmono-llvm.so.0" ]
|
|
then
|
|
TRYLLVM="try-llvm,"
|
|
LLVMNOTE=" (trying with LLVM, this might take a few minutes)"
|
|
fi
|
|
if [ -z "$HASSSE41" ]
|
|
then
|
|
TRYLLVM=""
|
|
LLVMNOTE=" (LLVM disabled due to missing SSE4.1)"
|
|
fi
|
|
echo "Mono precompiling #FILE# for ${MONOARCH}${LLVMNOTE}..."
|
|
mkdir -p /usr/lib/mono/aot-cache/${MONOARCH}/
|
|
/usr/bin/mono --aot=${TRYLLVM}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
|
|
fi
|