bazel-contrib / bazel-contrib/bazel-lib

[Bug]: Cannot define custom `coreutils_toolchain`

Open
#812 0 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
Starlark
Stars
182
Forks
134
Avg merge
1d 46m
Merged PRs (30d)
1

Description

### What happened?

`coreutils_toolchain` isn't publicly exported, however users may want to define a custom `coreutils_toolchain` because of some esoteric CPU architecture

For example, being able to define custom toolchains would help solve some of these problems:
* https://github.com/aspect-build/bazel-lib/issues/701
* https://github.com/aspect-build/bazel-lib/issues/671
* https://github.com/aspect-build/bazel-lib/issues/519

I'm currently using a patched version which exports the toolchain so we can use it in a definition. We should also consider doing this for other binaries as well (tar, etc.). If PRs are welcome, I can open a PR to implement this

### Version

Development (host) and target OS/architectures: ARM / x86 centos 7

Output of `bazel --version`:
```
Bazelisk version: v1.17.0
Build label: 7.0.0
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Mon Dec 11 16:50:16 2023 (1702313416)
Build timestamp: 1702313416
Build timestamp as int: 1702313416
```

Version of the Aspect rules, or other relevant rules from your
`WORKSPACE` or `MODULE.bazel` file:
```
faaada2eaa08de480f0db4fd1fcddead6aaed177 for bazel-lib
```

Language(s) and/or frameworks involved:
aspect_bazel_lib, aspect_rules_js

### How to reproduce

_No response_

### Any other information?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by locating the definition and exports for `coreutils_toolchain` in bazel-lib, then inspect how related binary toolchains such as `tar` are exposed. Confirm that a user can define a custom toolchain for an unusual CPU architecture, and run the repository's relevant Bazel tests to verify the public API.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.