Docs on enabling LTO (-flto) with clang++
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- build-system, documentation
Research direction
Start with the issue checklist and the referenced spatial-algorithms pull request. Verify the Linux and OS X toolchain requirements, flags, environment variables, and linker error guidance; the documentation is done when it covers each listed setup and troubleshooting detail.
Written by the indexing model from the issue text.
Description
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)
- Dominant language
- No language data
- Stars
- 110
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mapbox/cpp
-
glossary
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
-
Docs on ABIs Open
Difficulty 4/5 3-5 days Newbie friendliness 30/100
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
Bug v3
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
package-update
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oSoWoSo/vOid_Community_repOsitory#147 · 1 comment ·
-
Builders
Difficulty 2/5 1-3 hours Newbie friendliness 72/100