[llvm-dev] Linker Option support for ELF

Rafael Avila de Espindola via llvm-dev llvm-dev at lists.llvm.org
Wed Jan 3 17:04:30 PST 2018


Saleem Abdulrasool <compnerd at compnerd.org> writes:

> So you are suggesting that the backend take the opaque blob, peer through
> it, map it to something else and then encode that?

The llvm backend? No, it should probably be done by whatever produced
the IR. If viewing this a part of the file format, having the FE create
a metadata asking for (add_lib_enum_value, "foo.a") is not too different
than than asking for a particular visibility or dll import.

> This means that every
> single new flag (also consider vendor extensions and non-GNU linkers) would
> need their own mapping and would need additional support for every single
> variant of an option.  This makes adding support for a flag extremely
> expensive IMO.

Is some sense that is the idea: forcing each feature to be documented
and discussed. What feature other than "add that lib" do you have in mind?

Cheers,
Rafael


More information about the llvm-dev mailing list