From 7360c6acf1c485bde54361dee6e307cf435582a3 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Fri, 27 Oct 2023 06:46:12 -0400 Subject: [PATCH] [Driver][test][NFC] Simplify some of the OpenBSD tests --- clang/test/Driver/openbsd.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/clang/test/Driver/openbsd.c b/clang/test/Driver/openbsd.c index 713bf350ee188b..f42da97110b502 100644 --- a/clang/test/Driver/openbsd.c +++ b/clang/test/Driver/openbsd.c @@ -2,7 +2,7 @@ // RUN: %clang --target=i686-pc-openbsd -static -### %s 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-LD-STATIC-EH %s // CHECK-LD-STATIC-EH: "-cc1" "-triple" "i686-pc-openbsd" -// CHECK-LD-STATIC-EH: ld{{.*}}" "-e" "__start" "--eh-frame-hdr" "-Bstatic" "-o" "a.out" "{{.*}}rcrt0.o" "{{.*}}crtbegin.o" "{{.*}}.o" "-lcompiler_rt" "-lc" "-lcompiler_rt" "{{.*}}crtend.o" +// CHECK-LD-STATIC-EH: ld{{.*}}" "{{.*}}" "--eh-frame-hdr" "-Bstatic" // Check for profiling variants of libraries when linking and -nopie // RUN: %clang --target=i686-pc-openbsd -pg -pthread -### %s 2>&1 \ @@ -26,10 +26,8 @@ // Check that the new linker flags are passed to OpenBSD // RUN: %clang --target=i686-pc-openbsd -r -### %s 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-LD-R %s -// RUN: %clang --target=i686-pc-openbsd -s -### %s 2>&1 \ -// RUN: | FileCheck --check-prefix=CHECK-LD-S %s -// RUN: %clang --target=i686-pc-openbsd -t -### %s 2>&1 \ -// RUN: | FileCheck --check-prefix=CHECK-LD-T %s +// RUN: %clang --target=i686-pc-openbsd -s -t -### %s 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-LD-ST %s // RUN: %clang --target=mips64-unknown-openbsd -### %s 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-MIPS64-LD %s // RUN: %clang --target=mips64el-unknown-openbsd -### %s 2>&1 \ @@ -39,14 +37,12 @@ // CHECK-LD-R-NOT: "-l // CHECK-LD-R-NOT: crt{{[^./\\]+}}.o // CHECK-LD-R: "-r" -// CHECK-LD-S: "-cc1" "-triple" "i686-pc-openbsd" -// CHECK-LD-S: ld{{.*}}" "-e" "__start" "--eh-frame-hdr" "-dynamic-linker" "{{.*}}ld.so" "-o" "a.out" "{{.*}}crt0.o" "{{.*}}crtbegin.o" "-L{{.*}}" "-s" "{{.*}}.o" "-lcompiler_rt" "-lc" "-lcompiler_rt" "{{.*}}crtend.o" -// CHECK-LD-T: "-cc1" "-triple" "i686-pc-openbsd" -// CHECK-LD-T: ld{{.*}}" "-e" "__start" "--eh-frame-hdr" "-dynamic-linker" "{{.*}}ld.so" "-o" "a.out" "{{.*}}crt0.o" "{{.*}}crtbegin.o" "-L{{.*}}" "-t" "{{.*}}.o" "-lcompiler_rt" "-lc" "-lcompiler_rt" "{{.*}}crtend.o" +// CHECK-LD-ST: "-cc1" "-triple" "i686-pc-openbsd" +// CHECK-LD-ST: ld{{.*}}" "{{.*}}" "-s" "-t" // CHECK-MIPS64-LD: "-cc1" "-triple" "mips64-unknown-openbsd" -// CHECK-MIPS64-LD: ld{{.*}}" "-EB" "-e" "__start" "--eh-frame-hdr" "-dynamic-linker" "{{.*}}ld.so" "-o" "a.out" "{{.*}}crt0.o" "{{.*}}crtbegin.o" "-L{{.*}}" "{{.*}}.o" "-lcompiler_rt" "-lc" "-lcompiler_rt" "{{.*}}crtend.o" +// CHECK-MIPS64-LD: ld{{.*}}" "-EB" // CHECK-MIPS64EL-LD: "-cc1" "-triple" "mips64el-unknown-openbsd" -// CHECK-MIPS64EL-LD: ld{{.*}}" "-EL" "-e" "__start" "--eh-frame-hdr" "-dynamic-linker" "{{.*}}ld.so" "-o" "a.out" "{{.*}}crt0.o" "{{.*}}crtbegin.o" "-L{{.*}}" "{{.*}}.o" "-lcompiler_rt" "-lc" "-lcompiler_rt" "{{.*}}crtend.o" +// CHECK-MIPS64EL-LD: ld{{.*}}" "-EL" // Check that --sysroot is passed to the linker // RUN: %clang --target=i686-pc-openbsd -### %s 2>&1 \