https://issues.dlang.org/show_bug.cgi?id=20082
Rainer Schuetze <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] Hardware|x86_64 |All OS|Windows |All --- Comment #1 from Rainer Schuetze <[email protected]> --- The problem is that the dtor is referenced by the TypeInfo for S and that the MS linker doesn't eliminate the reference to it before removing unused COMDATs due to the default /OPT:REF. optlink is more aggressive and works the other way araound. Even if the MS linker behaved the same, the default for /DEBUG builds is /OPT:NOREF so the issue would reappear, and more so with debug info generation (optlink also reports the unresolved symbol in that case). The online compiler (probably linux) also reports an unresolved symbol, so the problem is not Windows specific. For the MS linker, a workaround might be to add a pragma(linkerDirective, "/ALTERNATENAME:...") to weakly redirect the symbol to a dummy function. --
