-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: search for the sysroot
in compile args
#313
base: main
Are you sure you want to change the base?
Conversation
@lukasoyen Do you know anyway to query the info from cc_toolchain directly. This creates an unused args on each action run. And is quite wasteful... Better way should fuse it into the toolchain configuration. |
Seems to be designed to be accessible from Then we can attach it to our cuda_info then add a corresponding feature for it. |
I read through that code while figuring things out. I think that is different and not meant for the rule based toolchains.
I think the rule based toolchains are designed in a way to make the |
As said in #313 (comment) I agree this is wasteful and slow. I don't see a reason to not put the detection into the toolchain config. The CC toolchain is an attribute already at the detection already queries the CC toolchain for the compiler binary. I am just not sure how all that plumbing would turn out. But I am up to try if you prefer it that way. Edit: to not put |
Sorry for the delay. Was busy working on internal projects. After examining the cc rules implementation https://github.com/bazelbuild/bazel/blob/a3abc625c78439a5ebf1bb09491627c802f2453d/src/main/starlark/builtins_bzl/common/cc/cc_toolchain_provider_helper.bzl#L198-L204 I think We can just ignore Then we have a better way to implement this. I will provide you an improved PR for this issue. |
Wit the new `cc_rules` based toolchains, the `sysroot` on the toolchain is not set. But we can infer it from the command line args a normal compilation with that toolchain would get.
0e2bccf
to
ba87185
Compare
With the new
cc_rules
based toolchains, thesysroot
on the toolchain is not set. But we can infer it from the command line args a normal compilation with that toolchain would get.