Switch to using -Wl,-R on Solaris.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65927 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Makefile.rules b/Makefile.rules
index 21403e0..1dc329d 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -428,7 +428,7 @@
 endif
 
 ifdef SHARED_LIBRARY
-  LD.Flags += -Wl,-rpath -Wl,$(LibDir)
+  LD.Flags += $(RPATH) -Wl,$(LibDir)
 endif
 
 ifdef TOOL_VERBOSE
@@ -458,9 +458,9 @@
 ifneq ($(OS),Darwin)
 ifdef TOOLNAME
 ifdef EXAMPLE_TOOL
-  LD.Flags += -Wl,-rpath -Wl,$(ExmplDir) -export-dynamic
+  LD.Flags += $(RPATH) -Wl,$(ExmplDir) -export-dynamic
 else
-  LD.Flags += -Wl,-rpath -Wl,$(ToolDir) -export-dynamic
+  LD.Flags += $(RPATH) -Wl,$(ToolDir) -export-dynamic
 endif
 endif
 endif