@ctfeonly
ketmar
ketmar at ketmar.no-ip.org
Thu Dec 7 03:52:25 UTC 2017
Nicholas Wilson wrote:
> Also not generating the code in the first place means less I/O for the
> compiler and less work for the linker.
this is solvable without any additional flags, tho: compiler should just
skip codegen phase for any function that is not referenced by another
compiled function (except for library case).
> I definitely don't want D to become C++. What is smartlinking?
any decent linker simply drops anything that is not reveferenced. i.e. any
function that is not referenced from another function that is definitely
included in the binary, will be skipped. as linker knows program entry
point, it is able to build reference tree, and do "smart" linking instead
of just putting everything into resulting binary.
> This is intended for stuff like code that generates strings for mixins.
as i said, this is something compiler can do automatically, without user's
help. we already have too much attributes, i believe, adding even more
won't do any good.
More information about the Digitalmars-d
mailing list