[clang] Disable FTZ/DAZ when compiling shared libraries by default. (PR #80475)

Joshua Cranmer via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 22 11:22:36 PST 2024


================
@@ -1569,6 +1569,40 @@
 // RUN:        --gcc-toolchain="" \
 // RUN:        --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
 // RUN:   | FileCheck --check-prefix=CHECK-NOCRTFASTMATH %s
+// Don't link crtfastmath.o with -shared
+// RUN: %clang --target=x86_64-unknown-linux -no-pie -### %s -ffast-math -shared \
+// RUN:        --gcc-toolchain="" \
----------------
jcranmer-intel wrote:

The tests use a custom sysroot that provides a `crtfastmath.o` file, so it doesn't matter whether or not it's provided by the host toolchain.

https://github.com/llvm/llvm-project/pull/80475


More information about the cfe-commits mailing list