[PATCH] D54741: [Driver] Link sanitizer runtime deps on Fuchsia when needed

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 20 20:36:29 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rC347378: [Driver] Link sanitizer runtime deps on Fuchsia when needed (authored by phosek, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D54741?vs=174728&id=174868#toc

Repository:
  rC Clang

https://reviews.llvm.org/D54741

Files:
  lib/Driver/ToolChains/Fuchsia.cpp


Index: lib/Driver/ToolChains/Fuchsia.cpp
===================================================================
--- lib/Driver/ToolChains/Fuchsia.cpp
+++ lib/Driver/ToolChains/Fuchsia.cpp
@@ -109,8 +109,7 @@
                   D.getLTOMode() == LTOK_Thin);
   }
 
-  addSanitizerRuntimes(ToolChain, Args, CmdArgs);
-
+  bool NeedSanitizerDeps = addSanitizerRuntimes(ToolChain, Args, CmdArgs);
   AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs, JA);
   ToolChain.addProfileRTLibs(Args, CmdArgs);
 
@@ -134,6 +133,9 @@
       }
     }
 
+    if (NeedSanitizerDeps)
+      linkSanitizerRuntimeDeps(ToolChain, CmdArgs);
+
     AddRunTimeLibs(ToolChain, D, CmdArgs, Args);
 
     if (Args.hasArg(options::OPT_pthread) ||


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54741.174868.patch
Type: text/x-patch
Size: 715 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181121/db286c64/attachment.bin>


More information about the cfe-commits mailing list