brintos

brintos / llvm-project-archived public Read only

0
0
Text · 651 B · 35da97d Raw
40 lines · plain
1#!/bin/sh2 3function test () {4    arch=$15    file=$26    name=$37    ldflags=$48 9    if gcc -arch $arch -Os $file $ldflags -DLIBNAME=$name10    then11	if ./a.out12	then13	    rm ./a.out14	else15	    echo "fail"16	fi17    else18	echo "$FILE failed to compile"19    fi20}21 22INSTALLED=/usr/local/lib/system/libcompiler_rt.a23 24for ARCH in i386 x86_64; do25	for FILE in $(ls *.c); do26		27		echo "Timing $FILE for $ARCH"28 29		test $ARCH $FILE libgcc ""30                test $ARCH $FILE tuned ../../darwin_fat/Release/libcompiler_rt.a31                if [ -f "$INSTALLED" ]; then32                    test $ARCH $FILE installed $INSTALLED33		fi34 35		echo " "36		37	done38done39exit40