[LLVMdev] LLVM Shared DLL not supported reason
mats petersson
mats at planetcatfish.com
Wed Apr 1 10:31:14 PDT 2015
As far as I understand, the issue is to "not exporting every function"
(and also potentially exporting C++ functions, which is a lot harder,
because it may require "expanding" templates and name-mangiling). To
actually support those features, it's necessary to have support from
the compiler to say "I want to export this function, I don't want to
export this function".
For simple cases, then exporting everything may be fine. But for
complex software projects, it's typically a bad idea to "export
everything".
--
Mats
On 1 April 2015 at 17:46, Mukul Sabharwal <mjsabby at gmail.com> wrote:
> FWIW, I've got a powershell script that builds an exports.def file for
> recognizable C functions.
>
> You could adapt it to Python and make it part of the official build if the
> LLVM community thinks it will be beneficial to have libLLVM.dll
>
> The script is located here:
>
> https://github.com/mjsabby/LLVMSharp/blob/master/GenLLVMDLL.ps1
>
> On Wed, Apr 1, 2015 at 9:03 AM, Reid Kleckner <rnk at google.com> wrote:
>>
>> Windows DLLs generally require that you know what you want to export from
>> them. LLVM has no export annotations or export lists, so we don't support
>> building DLLs. If you are using mingw, then ld supports the
>> --export-all-symbols flag which might work, but I don't think it's well
>> tested.
>>
>> On Tue, Mar 31, 2015 at 11:33 AM, Hayden Livingston
>> <halivingston at gmail.com> wrote:
>>>
>>> Upon reading http://llvm.org/docs/GettingStarted.html it says I can build
>>> shared libs, but when going to the CMake doc
>>> (http://llvm.org/docs/CMake.html) it says Shared libraries are not supported
>>> on Windows and not recommended for other OSes.
>>>
>>> Is there a reason why? At least for on Windows.
>>>
>>> _______________________________________________
>>> LLVM Developers mailing list
>>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>>
>>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
More information about the llvm-dev
mailing list