[PATCH] D57303: [ToolChains] [NetBSD] Append -rpath for shared compiler-rt runtimes

Michał Górny via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 30 00:22:28 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL352610: [clang] [Driver] [NetBSD] Append -rpath for shared compiler-rt runtimes (authored by mgorny, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D57303?vs=183758&id=184253#toc

Repository:
  rL LLVM

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

https://reviews.llvm.org/D57303

Files:
  cfe/trunk/lib/Driver/ToolChains/NetBSD.cpp


Index: cfe/trunk/lib/Driver/ToolChains/NetBSD.cpp
===================================================================
--- cfe/trunk/lib/Driver/ToolChains/NetBSD.cpp
+++ cfe/trunk/lib/Driver/ToolChains/NetBSD.cpp
@@ -255,6 +255,13 @@
   bool NeedsXRayDeps = addXRayRuntime(ToolChain, Args, CmdArgs);
   AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs, JA);
 
+  const SanitizerArgs &SanArgs = ToolChain.getSanitizerArgs();
+  if (SanArgs.needsSharedRt()) {
+    CmdArgs.push_back("-rpath");
+    CmdArgs.push_back(Args.MakeArgString(
+        ToolChain.getCompilerRTPath().c_str()));
+  }
+
   unsigned Major, Minor, Micro;
   ToolChain.getTriple().getOSVersion(Major, Minor, Micro);
   bool useLibgcc = true;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57303.184253.patch
Type: text/x-patch
Size: 715 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190130/60d0c2c8/attachment.bin>


More information about the cfe-commits mailing list