[PATCH] D36202: [Driver] Disable static C++ library support on Fuchsia

Roland McGrath via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 1 17:32:39 PDT 2017


mcgrathr accepted this revision.
mcgrathr added a comment.
This revision is now accepted and ready to land.

LGTM.  The nit below is orthogonal to this change.



================
Comment at: lib/Driver/ToolChains/Fuchsia.cpp:112
         ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs);
-        if (OnlyLibstdcxxStatic)
-          CmdArgs.push_back("-Bdynamic");
-      }
       CmdArgs.push_back("-lm");
     }
----------------
Shouldn't -lm be conditionalized on ShouldLinkCXXStdlib too?
It's only there to satisfy references from libc++, right?

OTOH, -lm is a no-op on Fuchsia so perhaps we should just drop it.  On the third hand, we might separate libm from libc in the future so perhaps it's better to leave it.


Repository:
  rL LLVM

https://reviews.llvm.org/D36202





More information about the cfe-commits mailing list