[llvm-branch-commits] [clang] [llvm] Backport "riscv-isa" module metadata to 18.x (PR #91514)

Craig Topper via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed May 8 12:31:24 PDT 2024


topperc wrote:

> Can you briefly summarize why this is important to backport? At first glance, this is only relevant for LTO with mixed architecture specifications, which... I can see someone might want it, I guess, but it seems pretty easy to work around not having it.

It's not just mixed architecture specifications. Even in a non-mixed situation the Compressed instruction flag in the ELF header doesn't get set correctly for LTO. Prior to these patches, the flag is set using the subtarget features from the TargetMachine which are empty in an LTO build. The linker needs this flag to do linker relaxation for alignment correctly. The workaround is to pass `-Wl,-plugin-opt=-mattr=+c`.

CC @ilovepi who asked me to try to backport it.

https://github.com/llvm/llvm-project/pull/91514


More information about the llvm-branch-commits mailing list