Files
clang-p2996/compiler-rt/test/timing/time
Daniel Dunbar efd84e770b Add support for "platform" configurations, which define a suite of compiler-rt
libraries to generate.
 - Each library may be built with different flags and for different
   architectures, and there is support for building Darwin style fat archives.

 - Uses an ambituous amount of make programming, but should be hidden to
   users and developers.

llvm-svn: 93720
2010-01-18 06:49:33 +00:00

40 lines
651 B
Bash
Executable File

#!/bin/sh
function test () {
arch=$1
file=$2
name=$3
ldflags=$4
if gcc -arch $arch -Os $file $ldflags -DLIBNAME=$name
then
if ./a.out
then
rm ./a.out
else
echo "fail"
fi
else
echo "$FILE failed to compile"
fi
}
INSTALLED=/usr/local/lib/system/libcompiler_rt.a
for ARCH in i386 x86_64; do
for FILE in $(ls *.c); do
echo "Timing $FILE for $ARCH"
test $ARCH $FILE libgcc ""
test $ARCH $FILE tuned ../../darwin_fat/Release/libcompiler_rt.a
if [ -f "$INSTALLED" ]; then
test $ARCH $FILE installed $INSTALLED
fi
echo " "
done
done
exit