December 31, 2016 Re: annotating (object/library files) with compilation metadata to avoid incompatible libraries | ||||
---|---|---|---|---|
| ||||
On 20 December 2016 at 13:04, Timothee Cour via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> Could dmd/ldc/gdc produce user defined attributes embedded (eg as json string) embedded in some section of the object file/static/shared library, eg:
>
> ```
> {"compiler" : "dmd", "version" : "2.072", "flags" : "-O -debug"}
> ```
>
Object file, yes. Static library, no. Shared library, maybe, but you probably won't read them anyway.
I toyed about with such an idea to support pragma(lib), but I shelved it when I realised that it would only work for sources being built (there is an .o passed on the command-line), and not for external libraries.
|
Copyright © 1999-2021 by the D Language Foundation