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

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 24 15:13:42 PDT 2024


================
@@ -1307,9 +1307,14 @@ void ToolChain::AddCCKextLibArgs(const ArgList &Args,
 
 bool ToolChain::isFastMathRuntimeAvailable(const ArgList &Args,
                                            std::string &Path) const {
+  // Don't implicitly link in mode-changing libraries in a shared library, since
+  // this can have very deleterious effects. See the various links from
+  // https://github.com/llvm/llvm-project/issues/57589 for more information.
+  bool Default = !Args.hasArg(options::OPT_shared);
----------------
MaskRay wrote:

hasArgNoClaim

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


More information about the cfe-commits mailing list