bazelbuild / bazelbuild/rules_cc

rules_cc fails on windows: Error: key "DUMPBIN" not found in dictionary

Open
#308 5 comments 0 reactions 0 assignees View on GitHub
P3 type: bug
Dominant language
Starlark
Stars
247
Forks
196
PR merge metrics
No merged PRs in 30d

Description

Using Bazel 8.0.1 on windows rules_cc fails with following error `Error: key "DUMPBIN" not found in dictionary`.
```
ERROR ../rules_cc+/cc/private/toolchain/windows_cc_configure.bzl:754:64: An error occurred during the fetch of repository 'rules_cc++cc_configure_extension+local_config_cc':
Traceback (most recent call last):
File ".../rules_cc+/cc/private/toolchain/cc_configure.bzl", line 89, column 36, in cc_autoconf_impl
configure_windows_toolchain(repository_ctx)
File ".../rules_cc+/cc/private/toolchain/windows_cc_configure.bzl", line 881, column 35, in configure_windows_toolchain
msvc_vars_x64 = _get_msvc_vars(repository_ctx, paths, "x64")
File ".../rules_cc+/cc/private/toolchain/windows_cc_configure.bzl", line 754, column 64, in _get_msvc_vars
"%{msvc_dumpbin_path_" + target_arch + "}": build_tools["DUMPBIN"],
```

Looks like `build_tools["DUMPBIN"] = find_msvc_tool(repository_ctx, vc_path, "dumpbin.exe", "x64")` is missing from `_get_msvc_vars` . Adding the missing line seems to fix the issue.

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.