[cfe-dev] [PATCH] plugin problem on Windows

Óscar Fuentes ofv at wanadoo.es
Sun Feb 13 20:00:36 PST 2011

John Thompson
<john.thompson.jtsoftware at gmail.com>

> With reference to the Bugzilla 9078 issue I posted, it appears the plug-in
> mechanism doesn't work on Windows.
> To recap, in loading a Windows plug-in DLL, the DLL will have it's own copy
> of the clang library code and data, such that the plug-in registry node list
> ends up in the DLL and not the Clang executable's data space, hence as-is,
> the plug-ins node doesn't end up in the registry instance in Clang.

A Windows DLL has a single copy of its code and data for a given
process. But I guess that the problem is that Clang is statically linked
into every plugin. A proper solution for that is to build Clang as a
DLL. You can manually do that on MinGW, but not on VC++.

> I've also modified the example.CMakeLists.txt file to build the example
> projects as part of the main build.

The `examples' directory is optionally added from the toplevel
CMakeLists.txt file. No need to add it again.


More information about the cfe-dev mailing list