Allow passing labels for builtin_sysroot instead of string #21156
Labels
P3
We're not considering working on this, but happy to review a PR. (No assignee)
team-Rules-CPP
Issues for C++ rules
type: feature request
Description of the feature request:
For some non-obvious reason
create_cc_toolchain_config_info
gets the fieldbuiltin_sysroot
as a string instead of as a label. This causes some major projects to use a hack in which they depend on the hard-coded pathexternal/{target name}
instead of a target label which imo will be a better approach. For example:And more... I think bazel should provide a suitable alternative which does not use these kinds of hacks. Such a solution may exist out there, yet I have not found one.
Which category does this issue belong to?
Rules API
What underlying problem are you trying to solve with this feature?
The fact that users of toolchains need to hard-code sysroot paths instead of using the natural approach which is labels.
Which operating system are you running Bazel on?
Rocky Linux
What is the output of
bazel info release
?release 6.4.0
If
bazel info release
returnsdevelopment 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 HEAD
?No response
Have you found anything relevant by searching the web?
Stack overflow which shows how to use sysroot path
https://stackoverflow.com/questions/62451307/specify-sysroot-for-bazel-toolchain
My Slack thread
https://bazelbuild.slack.com/archives/CA31HN1T3/p1706711506150469
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: