D-Programming-Language/dmd — pull request #4051 by rainers (2014-10-07 08:08:58+00:00)
Title: Issue 4014 - CodeView debug type info not linked in from library

https://issues.dlang.org/show_bug.cgi?id=4014

This PR adds a relocation to S.init if S is referred to by the debug info. It assumes the debug info is found there and will be linked in if S.init is linked in.

Currently only implemented for Win32/Win64.

This is an alternative to https://github.com/D-Programming-Language/dmd/pull/398

Advantages:
- debug info doesn't have to be rebuilt every time it is referred to
- small overhead in debug-section only

Disadvantages:
- no debug info, if library is built without
- assumes that S.init is found in the library, i.e. files with declarations only still need to be compiled (very much as proposed by https://github.com/D-Programming-Language/dmd/pull/3958)
- abuses S_LABEL32 debug record, maybe some other unrecognized record is better