nm, cpp, and objdump are absent from the new rule based toolchain

Open Beginner friendly
#707 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Domain
build-system

Research direction

Start by comparing the previous toolchain configuration at crosstool/cc_toolchain_config.bzl with toolchain/cc_toolchain.bzl and the rules_cc provider helper linked in the issue. Check how legacy_tools entries populate the nm, preprocessor, and objdump fields, then verify that the proposed entries restore the expected tool paths and that the existing nm failure is resolved.

Written by the indexing model from the issue text.

Description

With apple_support 2.9.1 and rules_cc 0.2.29 on Bazel 9.2.0/macOS, the new toolchain exposes an empty $(NM). This breaks an existing rules_zig genrule that invokes $(NM) --defined-only ....

The previous toolchain configuration declares /usr/bin/nm, /usr/bin/cpp, and /usr/bin/objdump. The new toolchain's legacy_tools contains only gcov. Unlike the compiler, archiver, linker, and strip tool, these three have no action-based fallback in rules_cc, leaving nm_executable, preprocessor_executable, and objdump_executable empty. Only nm has caused a failure in our tests so far.

Is this omission intentional, with consumers expected to provide their own tools instead of using these toolchain fields / make variables? Or would a patch restoring these three as cc_legacy_tool entries, using their previous paths, be welcome?

Dominant language
Starlark
Stars
109
Forks
79
Avg merge
4h 29m
Merged PRs (30d)
11

Getting set up

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/apple_support

All issues in bazelbuild/apple_support

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.