对脂肪lto-objects的支持

发布于 2025-01-29 04:27:50 字数 374 浏览 3 评论 0 原文

我有一个项目,我为我的主要目标使用 -flto = thin ,但是我不想将LTO应用于测试,因为它会减慢汇编(完整上下文:

正如建议的那样,在这里,如果您使用 lto 对象文件,则可能是仅包含中间语言,而没有二进制代码。因此,测试将始终与LTO

GCC 相关可用于LTO链接和正常链接。”

  • Clang有类似的东西吗?看起来 clang ++ 13 fat-lto-objects 选项只是忽略了。

I have a project where I use -flto=thin for my main targets, but I don't want to apply LTO to my tests since it slows compilation down (full context: lld runs LTO even if -fno-lto is passed).

As it is suggested here, it is likely that if you compile with lto the object files will only contain the intermediate language and no binary code. Therefore the tests will always be linked with LTO

GCC has the fat-lto-objects option: "Fat LTO objects are object files that contain both the intermediate language and the object code. This makes them usable for both LTO linking and normal linking."

  • Does clang have anything like that? It looks like that as for clang++13 the fat-lto-objects option is just ignored.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

沧笙踏歌 2025-02-05 04:27:50

应该在Clang 17中发布, https://llvm.gm.org/docs/docs/fatlto.html

Confusingly, this LLVM ticket mentions it only comes out in LLVM 18. https://github.com/llvm/llvm/llvm-project/issues/55431#issuecomment-1694769726

This was supposed to be released in Clang 17, https://llvm.org/docs/FatLTO.html

https://www.phoronix.com/news/LLVM-Fat-LTO-Objects

Confusingly, this LLVM ticket mentions it only comes out in LLVM 18. https://github.com/llvm/llvm-project/issues/55431#issuecomment-1694769726

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文