Commit fdf31ae3 authored by Roland McGrath's avatar Roland McGrath Committed by Petr Hosek
Browse files

[Fuchsia] Never link in implicit "system dependencies" of sanitizer runtimes

This is never appropriate on Fuchsia and any future needs for
system library dependencies of compiler-supplied runtimes will
be addressed via .deplibs instead of driver hacks.

Patch By: mcgrathr

Differential Revision: https://reviews.llvm.org/D73734
parent 809c872a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -583,6 +583,11 @@ static bool addSanitizerDynamicList(const ToolChain &TC, const ArgList &Args,

void tools::linkSanitizerRuntimeDeps(const ToolChain &TC,
                                     ArgStringList &CmdArgs) {
  // Fuchsia never needs these.  Any sanitizer runtimes with system
  // dependencies use the `.deplibs` feature instead.
  if (TC.getTriple().isOSFuchsia())
    return;

  // Force linking against the system libraries sanitizers depends on
  // (see PR15823 why this is necessary).
  CmdArgs.push_back("--no-as-needed");