bazel-contrib / bazel-contrib/toolchains_llvm

Consider adding nostdlib++ whenever a stdlib is explicitly indicated

Open
#532 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.