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
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to