<div>I've updated my experimental Clang big DLL patches, against revision 138276 (8/22/11).</div>
<div> </div>
<div>To recap, this creates a big Clang DLL, and links key executables against it.  This is needed to allow plug-ins and other DLL-dependent applications to share the Clang code and static data on Windows (i.e. it fixes the plug-in registry mechanism which doesn't currently work on Windows).<br clear="all">
</div>
<div>To preserve the present build hierarchy I did some stuff under the covers in the cmake stuff to allow a new ClangDLL project to reference all the sources from the Clang and LLVM libraries, and redirect the executable builds to link against the clang DLL instead of the static libraries.</div>

<div> </div>
<div>Regarding the Clang sources, I added "(name)_LINKAGE" tags to key symbols needed to build the clang executable.  These symbols are defined in new per-library-project headers "(name)Common.h".</div>

<div> </div>
<div>Because of their size, I stored the patches externally here:</div>
<div> </div>
<div><a href="http://www.jtlanguage.com/xfer/dll_llvm_patch.txt">http://www.jtlanguage.com/xfer/dll_llvm_patch.txt</a><br><a href="http://www.jtlanguage.com/xfer/dll_clang_patch.txt">http://www.jtlanguage.com/xfer/dll_clang_patch.txt</a><br>
</div>
<div>To do the build, delete the CMakeCache.txt file from the LLVM root, and regnerate the Visual Studio project files using:</div>
<div> </div>
<div>cmake -G "Visual Studio 10" -DCLANG_BUILD_EXAMPLES=ON -DLLVM_BUILD_DLL=ON .</div>
<div> </div>
<div>The "DLLVM_BUILD_DLL" flag enables the DLL build.</div>
<div> </div>
<div>For more info, please see my prior postings, mostly entitled "Big Clang DLL, plug-in mechanism revision" (May 4, 2011), or drop me a line.</div>
<div> </div>
<div>In particular, I'm hoping Chris can take a look at it, since it's a significant architectural thing.</div>
<div> </div>
<div>Note that I haven't exported everything that probably needs to be exported, just enough to get the driver and some plug-ins to build and run.  I'm thinking we can just add tags as needed.  I think there might be a limit on the total number of symbols that can be exported (16k?), so we probably can't just export everything, which is probably not needed anyway.</div>

<div> </div>
<div>While building, you might run into a dependency problem regarding the generated ".inc" files.  If so, just run "Build" (not Rebuild) again.</div>
<div> </div>
<div>Thanks.</div>
<div> </div>
<div>-John</div>
<div><br>-- <br>John Thompson<br><a href="mailto:John.Thompson.JTSoftware@gmail.com">John.Thompson.JTSoftware@gmail.com</a><br><br></div>