]> granicus.if.org Git - clang/commitdiff
Teach the link-step test to verify that we don't pass bad --hash-style
authorChandler Carruth <chandlerc@gmail.com>
Sat, 17 Dec 2011 21:57:25 +0000 (21:57 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sat, 17 Dec 2011 21:57:25 +0000 (21:57 +0000)
flags on MIPS paltforms.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146837 91177308-0d34-0410-b5e6-96231b3b80d8

test/Driver/linux-ld.c

index b611aef4037be0369664d33fc7cdda7464ab9a22..086080769f8c5cc8fbb5c919a9544577fec90557 100644 (file)
 // CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-suse-linux/4.1.2/../../../../lib64"
 // CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/lib/../lib64"
 // CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/usr/lib/../lib64"
+//
+// Check that we do not pass --hash-style=gnu and --hash-style=both to linker
+// when build for MIPS platforms.
+// RUN: %clang %s -### -o %t.o 2>&1 \
+// RUN:     -ccc-host-triple mips-linux-gnu -ccc-clang-archs mips \
+// RUN:   | FileCheck --check-prefix=CHECK-MIPS %s
+// CHECK-MIPS: "{{.*}}ld{{(.exe)?}}"
+// CHECK-MIPS-NOT: "--hash-style={{gnu|both}}"
+// RUN: %clang %s -### -o %t.o 2>&1 \
+// RUN:     -ccc-host-triple mipsel-linux-gnu -ccc-clang-archs mipsel \
+// RUN:   | FileCheck --check-prefix=CHECK-MIPSEL %s
+// CHECK-MIPSEL: "{{.*}}ld{{(.exe)?}}"
+// CHECK-MIPSEL-NOT: "--hash-style={{gnu|both}}"
+// RUN: %clang %s -### -o %t.o 2>&1 \
+// RUN:     -ccc-host-triple mips64-linux-gnu -ccc-clang-archs mips64 \
+// RUN:   | FileCheck --check-prefix=CHECK-MIPS64 %s
+// CHECK-MIPS64: "{{.*}}ld{{(.exe)?}}"
+// CHECK-MIPS64-NOT: "--hash-style={{gnu|both}}"
+// RUN: %clang %s -### -o %t.o 2>&1 \
+// RUN:     -ccc-host-triple mips64el-linux-gnu -ccc-clang-archs mips64el \
+// RUN:   | FileCheck --check-prefix=CHECK-MIPS64EL %s
+// CHECK-MIPS64EL: "{{.*}}ld{{(.exe)?}}"
+// CHECK-MIPS64EL-NOT: "--hash-style={{gnu|both}}"