[llvm-commits] [compiler-rt] r80938 - /compiler-rt/trunk/test/Unit/test
Daniel Dunbar
daniel at zuster.org
Thu Sep 3 13:03:21 PDT 2009
Author: ddunbar
Date: Thu Sep 3 15:03:21 2009
New Revision: 80938
URL: http://llvm.org/viewvc/llvm-project?rev=80938&view=rev
Log:
Don't use -arch on non-Darwin.
Modified:
compiler-rt/trunk/test/Unit/test
Modified: compiler-rt/trunk/test/Unit/test
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/Unit/test?rev=80938&r1=80937&r2=80938&view=diff
==============================================================================
--- compiler-rt/trunk/test/Unit/test (original)
+++ compiler-rt/trunk/test/Unit/test Thu Sep 3 15:03:21 2009
@@ -1,4 +1,15 @@
-for ARCH in i386 x86_64 ppc; do
+#!/usr/bin/env bash
+
+ARCHS='<host>'
+if test `uname` = "Darwin"; then
+ ARCHS="i386 x86_64 ppc"
+fi
+
+for ARCH in $ARCHS; do
+ CFLAGS="-Os -nodefaultlibs"
+ if test "$ARCH" != '<host>'; then
+ CFLAGS="-arch $ARCH $CFLAGS"
+ fi
for FILE in $(ls *.c); do
# Use -nodefaultlibs to avoid using libgcc.a
# Use -lSystem to link with libSystem.dylb.
@@ -16,7 +27,7 @@
# this test requires an extra compiler option
EXTRA="-fnested-functions"
fi
- if gcc -nodefaultlibs -arch $ARCH -Os $FILE ../../Release/libcompiler_rt.Optimized.a -lSystem $EXTRA
+ if gcc $CFLAGS $FILE ../../Release/libcompiler_rt.Optimized.a -lSystem $EXTRA
then
echo "Testing $FILE for $ARCH"
if ./a.out
More information about the llvm-commits
mailing list