mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-31 12:03:13 +01:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user