Skip to content

Commit

Permalink
[Driver][test][NFC] Simplify some of the OpenBSD tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brad0 committed Oct 27, 2023
1 parent 9299ace commit 7360c6a
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions clang/test/Driver/openbsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand Down

0 comments on commit 7360c6a

Please sign in to comment.