DIP45: fixing the dllimport/dllexport issue

Benjamin Thaut code at benjamin-thaut.de
Fri Aug 30 03:09:01 PDT 2013


Am 30.08.2013 11:52, schrieb deadalnix:
> 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.

I don't consider good it good design to add lots of indirections just to 
remove a command line parameter to the compiler. Its not like its going 
to make any difference in source code.


More information about the Digitalmars-d mailing list