rnk accepted this revision.
rnk added a comment.

Looks good with a minor comment about a comment in the test case.



================
Comment at: lib/Driver/Tools.cpp:2007-2009
+  // In the cross-compilation case, arch-specific library path is likely
+  // unavailable at runtime.
+  if (TC.isCrossCompiling()) return;
----------------
This seems like a really poor heuristic for "will the user ship this binary to 
another computer that doesn't have clang installed in the same location", but 
the convenience of not having to add clang's unpredictably named resource 
library directory to LD_LIBRARY_PATH seems worth baking in a possibly-wrong 
rpath.


================
Comment at: test/Driver/arch-specific-libdir-rpath.c:9
+//
+// Add LIBPATH but no RPATH for -fsanitize=address
+// RUN: %clang %s -### 2>&1 -target x86_64-linux \
----------------
This comment seems wrong, with -shared-libasan we add it to rpath. It's really, 
only add rpath if we are using shared libraries.


https://reviews.llvm.org/D30015



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to