Document `BAZEL_LINKOPTS` and other environment variables used in autoconfiguration

Open
#893 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
72/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Active
Tech stack
cpp

Research direction

Start with the autoconfiguration code and the split_escaped call in lib_cc_configure.bzl, then use issue #28639 to understand the BAZEL_LINKOPTS confusion. Document the environment variables used there and identify which pass through split_escaped, including the special handling they require; done means the behavior is clear to users configuring link options.

Written by the indexing model from the issue text.

Description

In https://github.com/bazelbuild/bazel/issues/28639, there is some confusion about how to set BAZEL_LINKOPTS: the core issue is that BAZEL_LINKOPTS is passed through split_escaped, but some linkopts contain the ":" character that is split on.

If we had documentation of the environment variables used in autoconfiguration, and which ones use split_escaped (and thus need special handling when set), this would have at least made the underlying issue more clear.

Dominant language
Starlark
Stars
247
Forks
196
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bazelbuild/rules_cc

All issues in bazelbuild/rules_cc

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.