Use $(PLATFORMLIBDL) to selectively bring in -ldl only on those platforms where
it is needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6753 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/opt/Makefile b/tools/opt/Makefile
index bc27e26..ba23dab 100644
--- a/tools/opt/Makefile
+++ b/tools/opt/Makefile
@@ -6,6 +6,6 @@
ipo ipa.a datastructure transforms target.a analysis \
transformutils vmcore support
-TOOLLINKOPTS = -ldl
+TOOLLINKOPTS = $(PLATFORMLIBDL)
include $(LEVEL)/Makefile.common