bazelbuild / bazelbuild/bazel

Documentation issue: Configuring C++ toolchains misleading linker invocation

Open
#13,917 2 comments 0 reactions 1 assignee Claimed by @jdob View on GitHub
P2 team-Documentation team-Rules-CPP type: documentation (cleanup)
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 16h
Merged PRs (30d)
72

Description

Documentation URL: https://docs.bazel.build/versions/main/tutorial/cc-toolchain-config.html

As this documentation stands it misleads the user into believing that the `ld` stanza of `tool_paths` controls the invocation of the linker, but it doesn't. If you put `/usr/games/cowsay` in for the linker, it still invokes the default host linker. I'm not smart enough to know why yet, but I guess it is because the `features` override things.

It seems to me that if you want to influence the linker, you are required to provide a list of ActionConfigInfo.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.