diff options
author | Jeff Cohen <jeffc@jolt-lang.org> | 2004-12-24 07:57:09 +0000 |
---|---|---|
committer | Jeff Cohen <jeffc@jolt-lang.org> | 2004-12-24 07:57:09 +0000 |
commit | 039b4abf6c3be75a0f50f7ec00f431778ce334f2 (patch) | |
tree | 1ec43be1aaa9ab97cf47084c874cc91184be4ee8 /llvm/lib/System/DynamicLibrary.cpp | |
parent | c81ccb488a5f7c4185c2c134b399cca515f538ec (diff) | |
download | llvm-039b4abf6c3be75a0f50f7ec00f431778ce334f2.zip llvm-039b4abf6c3be75a0f50f7ec00f431778ce334f2.tar.gz llvm-039b4abf6c3be75a0f50f7ec00f431778ce334f2.tar.bz2 |
Eliminate use of ltdl.c when doing a VC++ build. Because libtool isn't used,
ltdl's LGPL license would infect all of LLVM.
llvm-svn: 19137
Diffstat (limited to 'llvm/lib/System/DynamicLibrary.cpp')
-rw-r--r-- | llvm/lib/System/DynamicLibrary.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/lib/System/DynamicLibrary.cpp b/llvm/lib/System/DynamicLibrary.cpp index 116e26b..fc3d413 100644 --- a/llvm/lib/System/DynamicLibrary.cpp +++ b/llvm/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 |