[PATCH] Enable building LTO on WIN32
rafael.espindola at gmail.com
Mon Sep 30 06:46:37 PDT 2013
On 30 September 2013 09:31, <Greg_Bedwell at sn.scee.net> wrote:
>> Instead of creating a .def file, can't we annotate the source with
> I'm happy to make that change if that's the way that is generally
> preferred. In general for Windows-only code I'd choose dllexport
> annotations over creating a .def file to keep the information
> contained/documented in the header. My concern here was that the Makefile
> builds already use the lto.exports file as the canonical list of exported
> functions so by using that as the basis for the Windows DLL exports we've
> only got the information in a single place so there's no ongoing work to
> keep them in sync (beyond having to rerun CMake - a further improvement
> might be to see if we can move that process into build time rather than
> CMake time).
> I'll go with whatever option is preferred. Personally, for the above
> reason I prefer the def file approach in this case but I don't have a
> particularly strong opinion if the exported interface is expected to
> generally remain fairly stable.
OK, I agree.
We should switch to in source annotations at some point, but we should
do so for windows and ELF/MachO at the same time. Using the .def for
now is OK.
More information about the llvm-commits