[cfe-dev] Clang Plugins on Windows
Christopher Baish via cfe-dev
cfe-dev at lists.llvm.org
Mon Sep 30 05:40:59 PDT 2019
Good Afternoon All,
I have written a plugin for Clang which does additional type checking around format strings. It is currently running as a plugin on Linux and macOS machines.
We are hoping to also run it on our Windows builds, in order to boost our coverage, however I understand that the 'normal' way to use a clang plugin doesn't work on Windows.
The plugin currently works via a RecursiveASTVisitor, and then having found an instance of a var-args function call runs the custom type checker.
This (https://stackoverflow.com/questions/25657586/how-to-enable-dll-building-for-windows-in-llvm) implies that it would be possible to alter something in the build system to compile in the plugin library statically. This would be ideal for our use case, because we are building clang from source already, and we are only using it with the plugin, never alone.
Unfortunately I can't find any information on how to go about statically linking the library into the main executable, or about other ways we could go about getting this working.
I am more than happy to modify the existing code to a new architecture if necessary, either on all 3 OSs or just on Windows,
Thanks very much for any help offered
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190930/1d7403c2/attachment.html>
More information about the cfe-dev
mailing list