aykevl added a comment. Herald added a reviewer: MaskRay. I would be very interested in this patch, because for me to use ThinLTO without size regressions I need to set the optimization size level in the linker (`PassManagerBuilder.SizeLevel` etc). This patch seems mostly correct to me, except for the function attributes. These function attributes (`optsize`, `minsize`) should IMHO be set in the frontend, not in the linker.
Apart from that, would it be reasonable to implement this in the form of `-plugin-opt=Os` and `-plugin-opt=Oz`? That is perhaps a cleaner UI (doesn't need a new flag!) and more cleanly maps to `PassBuilder::Oz` and the like. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72404/new/ https://reviews.llvm.org/D72404 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits