DIP45: fixing the dllimport/dllexport issue

deadalnix deadalnix at gmail.com
Fri Aug 30 02:52:46 PDT 2013


On Friday, 30 August 2013 at 09:33:25 UTC, Benjamin Thaut wrote:
> Am 30.08.2013 11:17, schrieb deadalnix:
>> My understanding is that it can be optimized away. Or can it ?
>
> It can in C/C++ because microsoft has really good LTO (link 
> time optimization). As Rainer Schuetze explained the format of 
> the object files used for LTO is propriatary and unkown to the 
> public. So we can not easily use that, and its unlikely we can 
> use it at all. Also for 32-bit windows it can not be optimized 
> away because optlink does not do LTO.
>

win32 is kind of a dead end anyway. It is still very alive today, 
but we want to aim for the future. And it WILL disappear.

The object format is kind of anoying.

> In theory it could be optimized away, but in pratice I doubt we 
> are going to see this kind of optimization in dmd any time 
> soon. And as dmd is the only viable option on windows right now 
> I would prefer the better performing second solution to this 
> problem

I understand. But sacrificing good design for immediate reward is 
bound to cost way more in the long run if D is successful. And if 
D fails, then it doesn't matter.


More information about the Digitalmars-d mailing list