diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-09-03 20:03:21 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-09-03 20:03:21 +0000 |
commit | 7edbe041a72d9663d612abe1d9a978d3b9c66444 (patch) | |
tree | 145010c78864ecd678d5d425774f412af8e712a6 /test | |
parent | 781a3b3ee6e90277eba14fb0cc4f0de88ffec0b6 (diff) | |
download | compiler-rt-7edbe041a72d9663d612abe1d9a978d3b9c66444.tar.gz compiler-rt-7edbe041a72d9663d612abe1d9a978d3b9c66444.tar.bz2 compiler-rt-7edbe041a72d9663d612abe1d9a978d3b9c66444.tar.xz |
Don't use -arch on non-Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@80938 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rwxr-xr-x | test/Unit/test | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/test/Unit/test b/test/Unit/test index 595a03cd..9937966e 100755 --- a/test/Unit/test +++ b/test/Unit/test @@ -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 @@ for ARCH in i386 x86_64 ppc; do # 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 |