bazelbuild / bazelbuild/bazel

Missing documentation for `strip` build variables

Open
#15,549 0 comments 0 reactions 0 assignees View on GitHub
help wanted P3 team-Documentation team-Rules-CPP type: process
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

### Description of the bug:

I'm looking at https://bazel.build/docs/cc-toolchain-config-reference#cctoolchainconfiginfo-build-variables in order to figure out which build variables are relevant to the invocation of the strip tool. From that, it seems there are only two, `input_file` and `stripopts`. Those are not enough though, the `output_file` variable seems to be used as well, from what I can see in the source code. For example, this is from tools/osx/crosstools/cc_toolchain_config.bzl:
```
strip_action = action_config(
action_name = ACTION_NAMES.strip,
flag_sets = [
flag_set(
flag_groups = [
flag_group(flags = ["-S", "-o", "%{output_file}"]),
flag_group(
flags = ["%{stripopts}"],
iterate_over = "stripopts",
),
flag_group(flags = ["%{input_file}"]),
],
),
],
tools = [tool(path = "/usr/bin/strip")],
)
```

### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

_No response_

### Which operating system are you running Bazel on?

Ubuntu

### What is the output of `bazel info release`?

5.1.1

### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.

_No response_

### What's the output of `git remote get-url origin; git rev-parse master; git rev-parse HEAD` ?

_No response_

### Have you found anything relevant by searching the web?

_No response_

### Any other information, logs, or outputs that you want to share?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the referenced C++ toolchain build-variables documentation and compare it with the strip_action definition in tools/osx/crosstools/cc_toolchain_config.bzl. Confirm which variables are used for strip actions, update the reference accordingly, and verify the documentation build or relevant documentation checks.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.