Skip to content

Commit a34133f

Browse files
kaadambryanpkc
authored andcommitted
Added Windows support to 'classic-flang.f95' driver test
Modified FileCheck regex pattern to match Windows path separator as well as binary suffix.
1 parent b9f11c8 commit a34133f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

clang/test/Driver/flang/classic-flang.f95

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,17 @@
5959
! RUN: %flang -target x86_64-linux-gnu -ccc-install-dir %S/../Inputs/basic_linux_tree/usr/bin -static-flang-libs \
6060
! RUN: %s -lfoo -### 2>&1 | FileCheck --check-prefixes=CHECK-LD,CHECK-STATIC-FLANG,CHECK-NO-OMP %s
6161

62-
! CHECK-LD: "{{.*}}ld"
62+
! CHECK-LD: "{{.*}}ld{{(.exe)?}}"
6363
! CHECK-LD-NOT: "-static"
64-
! CHECK-LD: "{{[^"]*}}classic-flang-{{[^ ]*}}.o" "-lflangmain" "-lfoo" "-L{{[^ ]*}}/basic_linux_tree/usr/lib"
64+
! CHECK-LD: "{{[^"]*}}classic-flang-{{[^ ]*}}.o" "-lflangmain" "-lfoo" "-L{{[^ ]*[/\\]+}}basic_linux_tree{{[/\\]+}}usr{{[/\\]+}}lib"
6565
! CHECK-DYNAMIC-FLANG-NOT: "-Bstatic"
6666
! CHECK-DYNAMIC-FLANG: "-lflang" "-lflangrti" "-lpgmath" "-lpthread" "-lrt" "-lm"
6767
! CHECK-DYNAMIC-FLANG-NOT: "-Bdynamic"
6868
! CHECK-STATIC-FLANG: "-Bstatic" "-lflang" "-lflangrti" "-lpgmath" "-Bdynamic" "-lpthread" "-lrt" "-lm"
6969
! CHECK-DYNAMIC-OMP-NOT: "-Bstatic"
70-
! CHECK-DYNAMIC-OMP: "-lomp" "-rpath" "{{[^ ]*}}/basic_linux_tree/usr/lib"
70+
! CHECK-DYNAMIC-OMP: "-lomp" "-rpath" "{{[^ ]*[/\\]+}}basic_linux_tree{{[/\\]+}}usr{{[/\\]+}}lib"
7171
! CHECK-DYNAMIC-OMP-NOT: "-Bdynamic"
72-
! CHECK-STATIC-OMP: "-Bstatic" "-lomp" "-Bdynamic" "-rpath" "{{[^ ]*}}/basic_linux_tree/usr/lib"
72+
! CHECK-STATIC-OMP: "-Bstatic" "-lomp" "-Bdynamic" "-rpath" "{{[^ ]*[/\\]+}}basic_linux_tree{{[/\\]+}}usr{{[/\\]+}}lib"
7373
! CHECK-NO-OMP-NOT: "-lomp"
7474

7575
! RUN: %flang -target x86_64-linux-gnu -ccc-install-dir %S/../Inputs/basic_linux_tree/usr/bin -static -static-flang-libs \
@@ -78,9 +78,9 @@
7878
! RUN: %s -lfoo -### 2>&1 | FileCheck --check-prefixes=CHECK-LD-STATIC,CHECK-STATIC-BOTH %s
7979
! RUN: %flang -target x86_64-linux-gnu -ccc-install-dir %S/../Inputs/basic_linux_tree/usr/bin -static -fopenmp -static-openmp \
8080
! RUN: %s -lfoo -### 2>&1 | FileCheck --check-prefixes=CHECK-LD-STATIC,CHECK-STATIC-BOTH %s
81-
! CHECK-LD-STATIC: "{{.*}}ld"
81+
! CHECK-LD-STATIC: "{{.*}}ld{{(.exe)?}}"
8282
! CHECK-LD-STATIC: "-static" "-o" "a.out"
83-
! CHECK-LD-STATIC: "{{[^"]*}}classic-flang-{{[^ ]*}}.o" "-lflangmain" "-lfoo" "-L{{[^ ]*}}/basic_linux_tree/usr/lib"
83+
! CHECK-LD-STATIC: "{{[^"]*}}classic-flang-{{[^ ]*}}.o" "-lflangmain" "-lfoo" "-L{{[^ ]*[/\\]+}}basic_linux_tree{{[/\\]+}}usr{{[/\\]+}}lib"
8484
! CHECK-LD-STATIC-NOT: "-Bstatic"
8585
! CHECK-LD-STATIC: "-lflang" "-lflangrti" "-lpgmath" "-lpthread" "-lrt" "-lm"
8686
! CHECK-LD-STATIC-NOT: "-Bdynamic"

0 commit comments

Comments
 (0)