bazelbuild/bazel

Missing documentation for `strip` build variables

Open

#15,549 创建于 2022年5月23日

在 GitHub 查看
 (0 评论) (0 反应) (0 负责人)Java (4,465 fork)batch import
P3help wantedteam-Documentationteam-Rules-CPPtype: process

仓库指标

Star
 (25,384 star)
PR 合并指标
 (平均合并 22天 20小时) (30 天内合并 77 个 PR)

描述

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

贡献者指南