[PATCH] D81359: [ELF] Add --[no-]relax for RISC-V

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 15 01:36:15 PDT 2020


grimar added a comment.

My main objection against this is that it introduces a `config->relax` which is not used and hence not needed.
I feel really uncomfortable to accept such way to do things as all last years of develepment we tried to avoid adding an unnecessary code to LLD and
I find it to be a very reasonable approach, I remember how I tried to do this, was stopped on reviews and as a result it actually helped to avoid a dead/unneded code few times.

GNU man says (https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_3.html):
//An option with machine dependent effects. This option is only supported on a few targets. See section ld and the H8 <https://reviews.llvm.org/H8>/300. See section ld and the Intel 960 family.
On some platforms, the `--relax' option performs global optimizations that become possible when the linker resolves addressing in the program, such as relaxing
address modes and synthesizing new instructions in the output object file. **On platforms where this is not supported, `--relax' is accepted, but ignored.**//

I'd be OK just to add it to the "Options listed below are silently ignored for now for compatibility." list to ignore it (+ to docs/ld.lld.1),
as currently no platforms are supporting it in LLD.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81359/new/

https://reviews.llvm.org/D81359





More information about the llvm-commits mailing list