[PATCH] D53854: [Driver] Use -push-/-pop-state and -as-needed for libc++ on Fuchsia

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 2 21:34:09 PDT 2018


MaskRay added inline comments.


================
Comment at: lib/Driver/ToolChains/Fuchsia.cpp:128
         if (OnlyLibstdcxxStatic)
-          CmdArgs.push_back("-Bstatic");
+          CmdArgs.push_back("-static");
         ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs);
----------------
If Fuchsia doesn't use gold, it is fine. gold diverges from ld.bfd (lld) in that `-static` switches the whole link to its special static mode. (as usually while you link libstdc++/libc++ statically, you can still link other libraries normally)

In ld.bfd/lld, `-Bstatic` is synonym with `-static`.


Repository:
  rC Clang

https://reviews.llvm.org/D53854





More information about the cfe-commits mailing list