Skip to content

Commit c469040

Browse files
committed
[Driver] Make linker command generation compatible with LLVM Flang
Upstream commit 1c0958b had changed how the -nostdlib option affects the linker command generated by the Classic Flang driver. This patch updates the Classic Flang test case to ensure that the behaviour is consistent with the LLVM Flang driver.
1 parent 16720a3 commit c469040

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,11 @@
129129
! CHECK-NOSTDLIB: "{{.*}}ld{{(.exe)?}}"
130130
! CHECK-NOSTDLIB-SAME: "{{[^"]*}}classic-flang-{{[^ ]*}}.o"
131131
! CHECK-NOSTDLIB-NOT: "-lflangmain"
132-
! CHECK-NOSTDLIB-SAME: "-lfoo" "-L{{[^ ]*[/\\]+}}basic_linux_tree{{[/\\]+}}usr{{[/\\]+}}lib"
132+
! CHECK-NOSTDLIB-SAME: "-lfoo"
133+
! CHECK-NOSTDLIB-NOT: "-L{{[^ ]*[/\\]+}}basic_linux_tree{{[/\\]+}}usr{{[/\\]+}}lib"
133134
! CHECK-NOSTDLIB-NOT: "-lflang" "-lflangrti" "-lpgmath"
134135
! CHECK-NOSTDLIB-NOT: "-lpthread" "-lrt"
135-
! CHECK-NOSTDLIB: "-lm"
136+
! CHECK-NOSTDLIB-NOT: "-lm"
136137
! CHECK-NOSTDLIB-NOT: "-lgcc"
137138
! CHECK-NOSTDLIB-NOT: "-lgcc_s"
138139
! CHECK-NOSTDLIB-NOT: "-lc"

0 commit comments

Comments
 (0)