[llvm] Automatically exporting symbols for C API on MSVC for LLVM.dll

Remi Gillig via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 7 14:37:09 PST 2017


Hello,

I needed to export symbols for the C API into LLVM.dll. The existing option
LLVM_BUILD_LLVM_DYLIB=ON didn't work as expected. The comment the top of
`tools/llvm-shlib/CMakeLists.txt` seemed to imply that it should export the
C API. However, that wasn't the case on MSVC.

The attached patch fixes that, hopefully in the least intrusive way. I
tested it with CMake 3.5.2 and VS 2015.

This is my first patch to LLVM, I tried to follow the steps of the
developer policy document. Let me know if there's anything else I need to
do or if I did anything wrong.

Thanks,
Remi Gillig.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170207/64749699/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LLVM_DLL_exports_symbols_on_MSVC.patch
Type: application/octet-stream
Size: 1482 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170207/64749699/attachment.obj>


More information about the llvm-commits mailing list