Docs on enabling LTO (-flto) with clang++
未关闭
还没有人认领这个 Issue。
- 主要语言
- 没有语言数据
- 星标
- 110
- 派生
- 17
- PR 合并指标
- 30 天内没有已合并 PR
描述
Getting Link Time optimization working takes certain combinations of modern tools and build settings. It would be great to have some general docs on this so that LTO is demystified and more commonly used.
Doc should cover:
Linux details
- upgraded binutils gold (can be installed via mason)
- at least clang++ 3.9.1 via mason
- llvm-ar and llvm-ranlib on path (and set in environment
AR=/path/to/llvm-arRANLIB=/path/to/llvm-ranlib) -fltoin the CXXFLAGS
OS X details
- Apple built in compiler or clang++ via mason
-fltoin the CXXFLAGS and LDFLAGS
Troubleshooting:
This error indicates that the linker does not understand the LTO format. This will happen on linux if you've not installed binutils from mason.
file.o: file not recognized: File format not recognized
clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 issue 检查清单和所引用的 spatial-algorithms pull request 开始。验证 Linux 和 OS X 的工具链要求、标志、环境变量以及链接器错误指南;当文档涵盖每一项列出的设置和故障排除细节时,文档工作即告完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- cpp
- 领域
- build-system, documentation
- Issue 类型
- 文档
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100