jhuber6 wrote: > > I think people are just confusing what `-flto` means when put on a link job. > > Including me. :) > > Apologies for my ignorance, what does this do and why do we want it? It > allows for some (LTO-related?) flags to be forwarded/handled correctly?
The clang driver is very conservative with forwarding flags to the linker because it doesn't always know that the linker supports. `-flto` is a promise that your linker supports LTO and it should accept some flags. It could honestly be improved if we know the linker is `ld.lld` (like in the AMDGPU case) but that's just how it works right now. https://github.com/llvm/llvm-project/pull/129118 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits