do dead code elimination in release with debug info mode

    dmd -v -release -m64 test.d
    link.exe /NOLOGO test  /OPT:NOICF

There's an implicit /OPT:REF involved.

    dmd -v -release -g -m64 test.d
    link.exe /NOLOGO test  /DEBUG /OPT:NOICF

/DEBUG implies /OPT:NOREF /OPT:NOICF thus we need to enable it again.

The /OPT:NOICF is coming from sc.ini btw to prevent merging EH sections. Was very puzzling for me.