[Openmp-commits] [PATCH] D30015: Add arch-specific directory to search path

Reid Kleckner via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Mar 3 13:41:24 PST 2017


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





More information about the Openmp-commits mailing list