[RISCV] Status of LTO for RISC-V

Hi all,

I wanted to use LTO with the rv32 target and stumbled upon some open
patches and wanted to ask what the status is on LTO for RISC-V?

Related patches:

[RISCV] enable LTO support, pass some options to linker.
[WIP] TargetMachine Hook for Module Metadata
pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO
[PoC][RISCV] enable LTO/ThinLTO on RISCV

If this is still WIP I would be happy to contribute.


Hi Noah - to my knowledge nobody has been pushing this work forwards
of late, so contributions would definitely be welcome.



Hi Noah
This year I have a new patch D102582 for enabling LTO in RISC-V.
D102582 changes the target-abi mismatched checking mechanism because allowing the module flag in IR
to overwrite the empty target-abi options does not doable.

Then D71387 is used to enable LTO for RISC-V.

  • Zakk

Alex Bradbury via llvm-dev <llvm-dev@lists.llvm.org> 於 2021年6月27日 週日 下午5:57寫道: