luarocks / hererocks

Python script for installing Lua/LuaJIT and LuaRocks into a local directory
MIT License
71 stars 12 forks source link

Add ldflags option #11

Open averms opened 3 years ago

averms commented 3 years ago

Some options, like -flto and -fPIE require that the same or a similar option be passed to the linker. See the GCC documentation for -pie:

Produce a dynamically linked position independent executable on targets that support it. For predictable results, you must also specify the same set of options used for compilation (-fpie, -fPIE, or model suboptions) when you specify this linker option.

And the documentation for -flto:

To use the link-time optimizer, -flto and optimization options should be specified at compile time and during the final link. It is recommended that you compile all the files participating in the same link with the same options and also specify those options at link time.

It would be helpful to have a --ldflags option that gets passed to all the linking commands.