[llvm-dev] Linker Option support for ELF

Rafael Avila de Espindola via llvm-dev llvm-dev at lists.llvm.org
Tue Jan 9 08:25:00 PST 2018


James Henderson via llvm-dev <llvm-dev at lists.llvm.org> writes:

> By my understanding, the proposal is that the user input looks something
> like:
>
> #pragma linker_directive("lib", "m")
>
> which is passed essentially as is to the linker, i.e. the directive payload
> is a pair of strings, the first being "lib", the second "m". It is then up
> to the linker to decide if it supports "lib" directives, and translate that
> into the corresponding command, or do something else if it doesn't support
> it, e.g. emit an error or ignore it. Neither the backend nor the frontend
> need to do any conversion, and it makes it much clearer that these aren't
> like any other command-line option (due to the limited set that can be
> passed through, and the possible differences in behaviour, such as order on
> the command-line).

This is exactly my understanding. I really like that the proposal is
transparent to clang and llvm and avoids any confusion with command line
options.

Cheers,
Rafael


More information about the llvm-dev mailing list