bazel-contrib / bazel-contrib/toolchains_llvm
Consider adding nostdlib++ whenever a stdlib is explicitly indicated
- Dominant language
- Starlark
- Stars
- 371
- Forks
- 283
- Avg merge
- 1d 55m
- Merged PRs (30d)
- 25
Description
This toolchain adds enough flags to cause programs to be linked to libc++ and libc++abi, in which case the build will succeed with the `-nostdlib++` flag. The flag will also prevent the eventuality that a program is linked to both libc++ and libstdc++. Consider adding it to the toolchain flags where appropriate.
A related safety improvement would be to add nostdinc++ whenever the libc++ header paths are being given as flags, to prevent searching for (and erroneously finding) the GNU c++ headers.
Contributor guide
Research direction
Start by locating the toolchain flags that add libc++ and libc++abi, then identify where a standard library or libc++ header paths are explicitly selected. Check the existing toolchain variants and determine which should receive -nostdlib++ and -nostdinc++; done means the relevant configurations avoid mixing libc++ with libstdc++ or GNU C++ headers.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100