[flang-commits] [flang] 09216cf - [flang] Use clang sysroot image to test fastmath linking

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Wed Feb 8 02:09:11 PST 2023


Author: Tom Eccles
Date: 2023-02-08T10:01:09Z
New Revision: 09216cfdab87fc97afc0b0bc7998adff5ab283c0

URL: https://github.com/llvm/llvm-project/commit/09216cfdab87fc97afc0b0bc7998adff5ab283c0
DIFF: https://github.com/llvm/llvm-project/commit/09216cfdab87fc97afc0b0bc7998adff5ab283c0.diff

LOG: [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

Added: 
    

Modified: 
    flang/test/Driver/fast_math.f90

Removed: 
    


################################################################################
diff  --git a/flang/test/Driver/fast_math.f90 b/flang/test/Driver/fast_math.f90
index 996fdf0fcc107..aadd7231b52b5 100644
--- a/flang/test/Driver/fast_math.f90
+++ b/flang/test/Driver/fast_math.f90
@@ -70,6 +70,8 @@
 ! UNSUPPORTED: system-windows
 ! UNSUPPORTED: target=powerpc{{.*}}
 ! RUN: %flang -ffast-math -### %s -o %t 2>&1 \
+! RUN:           --target=x86_64-unknown-linux -no-pie --gcc-toolchain="" \
+! RUN:           --sysroot=%S/../../../clang/test/Driver/Inputs/basic_linux_tree \
 ! RUN:     | FileCheck --check-prefix=CHECK-CRT %s
 ! CHECK-CRT: {{crtbegin.?\.o}}
 ! CHECK-CRT-SAME: crtfastmath.o


        


More information about the flang-commits mailing list