Minor cleanup related to my latest scheduler changes.
[oota-llvm.git] / unittests / Makefile.unittest
index 9a75b2c2eb8fd55ef06f192b547000ce63787f1c..8be6174cb908ac268778034816f9300a64bda8f6 100644 (file)
@@ -35,9 +35,11 @@ endif
 TESTLIBS = -lGoogleTest -lUnitTestMain
 
 ifeq ($(ENABLE_SHARED), 1)
-  # Add the absolute path to the dynamic library.  This is ok because
-  # we'll never install unittests.
-  LD.Flags += $(RPATH) -Wl,$(SharedLibDir)
+  ifneq (,$(RPATH))
+    # Add the absolute path to the dynamic library.  This is ok because
+    # we'll never install unittests.
+    LD.Flags += $(RPATH) -Wl,$(SharedLibDir)
+  endif
   # Also set {DYLD,LD}_LIBRARY_PATH because OSX ignores the rpath most
   # of the time.
   Run.Shared := $(SHLIBPATH_VAR)="$(SharedLibDir)$${$(SHLIBPATH_VAR):+:}$$$(SHLIBPATH_VAR)"