<div dir="ltr"><blockquote type="cite" style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px"><div dir="ltr"><div>I am using llvm for a jit engine in a large project, in which multiple shared library modules link against llvm.  Since llvm is recommended as a static library, this leads to shared library symbol conflicts, leading to llvm assertions in some global table look up or insertion during the shared library loading time.  That forced me to hide all llvm symbols during the link time.</div>

<div><br></div><div>An alternative solution would be using shared library of llvm.  But this package configuration is not supported for windows, and not recommended for other OSes according to llvm doc. see <a href="http://llvm.org/docs/CMake.html#frequently-used-cmake-variables" target="_blank">http://llvm.org/docs/CMake.html#frequently-used-cmake-variables</a> </div>

<div><br></div><div>I can understand that the reason of not supported for windows is the dll export/import declarations.</div><div><br></div><div>Could you help me understand why it is not recommended for other OSes and what needs to be done to fully support shared library of llvm?</div>

<div><br></div><div>One reason I am speculating is the global data in the llvm, which have been extensively used to store compiler options, machine types, optimization passes, ...  If compiled as a shared library and multiple modules link against it, undesired results could happen when different modules use the global data for different purposes. Anyone could confirm that?</div>

<div><br></div><div>Any other road blocks?</div><div><br></div><div>Thanks,</div><div>-Peng</div></div></blockquote></div>