[PATCH] D80488: Teach `-fsanitize=fuzzer` to respect `-static` and `-static-libstdc++` when adding C++ standard libraries.

Chandler Carruth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 18 18:29:21 PDT 2020


chandlerc added a reviewer: vitalybuka.
chandlerc marked an inline comment as done.
chandlerc added a comment.

Ping (and adding some sanitizer folks)? I'd really love to stop building with this local patch....



================
Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:754
+      if (OnlyLibstdcxxStatic)
+        CmdArgs.push_back("-Bstatic");
       TC.AddCXXStdlibLibArgs(Args, CmdArgs);
----------------
MaskRay wrote:
> This is correct. If GNU ld<2.25 compatibility is not needed, `--push-state`, `-Bstatic`, link, `--pop-state`
I'd prefer to keep this as-is because it matches exactly what the toolchain does elsewhere. If we want to drop support for older `ld`s, we should update in both places.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80488/new/

https://reviews.llvm.org/D80488



More information about the cfe-commits mailing list