Skip to content

Commit 09216cf

Browse files
committed
[flang] Use clang sysroot image to test fastmath linking
This test has been very unreliable across different machines. Update it to use clang's sysroot image so that the fastmath object file name is stable across different distributions and distro types. Based on clang/test/Driver/linux-ld.c Thanks to mnadeem for pointing this out at https://reviews.llvm.org/D138675 Differential Revision: https://reviews.llvm.org/D142807
1 parent 61c5c59 commit 09216cf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

flang/test/Driver/fast_math.f90

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@
7070
! UNSUPPORTED: system-windows
7171
! UNSUPPORTED: target=powerpc{{.*}}
7272
! RUN: %flang -ffast-math -### %s -o %t 2>&1 \
73+
! RUN: --target=x86_64-unknown-linux -no-pie --gcc-toolchain="" \
74+
! RUN: --sysroot=%S/../../../clang/test/Driver/Inputs/basic_linux_tree \
7375
! RUN: | FileCheck --check-prefix=CHECK-CRT %s
7476
! CHECK-CRT: {{crtbegin.?\.o}}
7577
! CHECK-CRT-SAME: crtfastmath.o

0 commit comments

Comments
 (0)