aboutsummaryrefslogtreecommitdiff
path: root/lib/System/DynamicLibrary.cpp
diff options
context:
space:
mode:
authorJeff Cohen <jeffc@jolt-lang.org>2004-12-24 07:57:09 +0000
committerJeff Cohen <jeffc@jolt-lang.org>2004-12-24 07:57:09 +0000
commit1a4663516b6b2e552e038b8e6fc2a0d9f0574f26 (patch)
tree67f7b877d3318539faa12efe0ee79a704b4dbc20 /lib/System/DynamicLibrary.cpp
parent3bf6960f3eb10fbc0884f3f84de4522309b0a6cc (diff)
Eliminate use of ltdl.c when doing a VC++ build. Because libtool isn't used,
ltdl's LGPL license would infect all of LLVM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19137 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/DynamicLibrary.cpp')
-rw-r--r--lib/System/DynamicLibrary.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/System/DynamicLibrary.cpp b/lib/System/DynamicLibrary.cpp
index 116e26bcc2..fc3d41316a 100644
--- a/lib/System/DynamicLibrary.cpp
+++ b/lib/System/DynamicLibrary.cpp
@@ -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 @@ void *DynamicLibrary::GetAddressOfSymbol(const char *symbolName) {
return lt_dlsym((lt_dlhandle) handle, symbolName);
}
+#endif // _WIN32 \ No newline at end of file