bkaradzic / GENie

GENie - Project generator tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[feature request] Add option to configure linker for `premake.gcc`

runlevel5 opened this issue · comments

AFAIK there is no option to choose different linker for premake.gcc. This issue is a proposal to introduce premake.gcc.linker or premake.gcc.ld option for users to change linker, for example to lld

It's already supported via GCC -B command line option:

-Bprefix

This option specifies where to find the executables, libraries, include files, and data files of the compiler itself.

The compiler driver program runs one or more of the subprograms cpp, cc1, as and ld. It tries prefix as a prefix for
each program it tries to run, both with and without `machine/version/'.

https://gcc.gnu.org/onlinedocs/gcc-4.0.4/gcc/Directory-Options.html

So you just need to add directory where you alternative linker is located to linkoptions in your script.

@bkaradzic the -B would cover the scenario in which ld is located in non-standard location. However I do not think it is the flag to choose totally different linker, for example lld in the case of using clang