# HG changeset patch # User Frits van Bommel # Date 1242912208 -7200 # Node ID 11b122f921368c4486731c2fc4178b5f1ecb05d0 # Parent e5c5d354c64979ba35d7a29dcf9014102772e943 Now that templates instantiations are no longer emitted for all modules that even blink at them they seem to break due to being linkonce (if compiled with any optimization level > 0), so let's give them weak linkage instead. The difference is that unreferenced linkonce symbols can be deleted, while weak symbols need to be preserved. diff -r e5c5d354c649 -r 11b122f92136 gen/linkage.h --- a/gen/linkage.h Thu May 21 10:56:04 2009 +0200 +++ b/gen/linkage.h Thu May 21 15:23:28 2009 +0200 @@ -3,11 +3,11 @@ // Make it easier to test new linkage types -# define TEMPLATE_LINKAGE_TYPE llvm::GlobalValue::LinkOnceODRLinkage +# define TEMPLATE_LINKAGE_TYPE llvm::GlobalValue::WeakODRLinkage # define TYPEINFO_LINKAGE_TYPE llvm::GlobalValue::LinkOnceODRLinkage // The One-Definition-Rule shouldn't matter for debug info, right? # define DEBUGINFO_LINKONCE_LINKAGE_TYPE \ - llvm::GlobalValue::LinkOnceAnyLinkage + llvm::GlobalValue::WeakAnyLinkage #endif