[PATCH] Let -rpath work

Rui Ueyama ruiu at google.com
Tue Sep 3 10:59:51 PDT 2013



================
Comment at: include/lld/ReaderWriter/ELFLinkingContext.h:224
@@ -215,2 +223,3 @@
   StringRef _sysrootPath;
+  StringRefVector _rpathList;
 };
----------------
So StringRefVector is a vector of *pointers to* StringRef? StringRef seems to be designed to be passed by value rather than by pointer, so it should have been a vector of StringRef (removing one indirection).

It's not introduced by this patch, so this patch is LGTM though.

================
Comment at: lib/Driver/GnuLdDriver.cpp:294
@@ +293,3 @@
+      SmallVector<StringRef, 2> rpaths;
+      StringRef(inputArg->getValue()).split(rpaths, ":");
+      for (auto path : rpaths)
----------------
So splitting makes sense? Manpage of the GNU linker does not even say that you can pass multiple values using ":". Splitting does not really look bad but just do nothing seems straightforward.


http://llvm-reviews.chandlerc.com/D1583



More information about the llvm-commits mailing list