[cfe-dev] BUILD_SHARED_LIBS=True breaks some tests
Kim Gräsman via cfe-dev
cfe-dev at lists.llvm.org
Sat Jan 12 02:09:48 PST 2019
On Wed, Jan 9, 2019 at 9:49 PM Chris Bieneman <chris.bieneman at me.com> wrote:
> > This doesn't make sense to me -- why would a shared build have
> > different runtime behavior from a static build? I was expecting a
> > symbol resolution failure of some kind, but this looks like the
> > compiler comes out broken somehow.
> I don't know about this specific case, but the difference in linker semantics for shared and static
> libraries is significant and can have an impact on runtime behavior. In my last email I just pointed
> out how llvm::cl::opt behaves differently between static and shared libs.
Sure, but the only problems I can think of off-hand are global
initialization order/duplication and possible fallout from ODR
violations. Both seem like latent bugs, especially the latter. But
maybe I'm missing something more subtle...
It's just curious that IWYU has a link failure on
PCHContainerOperations and Clang's test suite fails for stuff related
to it, both under BUILD_SHARED_LIBS.
More information about the cfe-dev