[llvm-commits] CVS: llvm/lib/System/DynamicLibrary.cpp

Jeff Cohen jeffc at jolt-lang.org
Thu Dec 23 23:57:21 PST 2004



Changes in directory llvm/lib/System:

DynamicLibrary.cpp updated: 1.6 -> 1.7
---
Log message:

Eliminate use of ltdl.c when doing a VC++ build.  Because libtool isn't used,
ltdl's LGPL license would infect all of LLVM.

---
Diffs of the changes:  (+14 -0)

Index: llvm/lib/System/DynamicLibrary.cpp
diff -u llvm/lib/System/DynamicLibrary.cpp:1.6 llvm/lib/System/DynamicLibrary.cpp:1.7
--- llvm/lib/System/DynamicLibrary.cpp:1.6	Fri Dec  3 22:17:20 2004
+++ llvm/lib/System/DynamicLibrary.cpp	Fri Dec 24 01:57:09 2004
@@ -12,6 +12,19 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/System/DynamicLibrary.h"
+
+// It is not possible to use ltdl.c on VC++ builds as the terms of its LGPL
+// license and special exception would cause all of LLVM to be placed under
+// the LGPL.  This is because the exception applies only when libtool is
+// used, and obviously libtool is not used with Visual Studio.  An entirely
+// separate implementation is provided in win32/DynamicLibrary.cpp.
+
+#ifdef _WIN32
+
+#include "win32/DynamicLibrary.cpp"
+
+#else
+
 #include "ltdl.h"
 #include <cassert>
 using namespace llvm;
@@ -135,3 +148,4 @@
   return lt_dlsym((lt_dlhandle) handle, symbolName);
 }
 
+#endif // _WIN32
\ No newline at end of file






More information about the llvm-commits mailing list