Skip to content
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

Use find_cpp_toolchain instead of accessing ctx.attr._cc_toolchain directly #1467

Closed
aherrmann opened this issue Jan 4, 2021 · 0 comments · Fixed by #1468
Closed

Use find_cpp_toolchain instead of accessing ctx.attr._cc_toolchain directly #1467

aherrmann opened this issue Jan 4, 2021 · 0 comments · Fixed by #1468

Comments

@aherrmann
Copy link
Member

With the --incompatible_enable_cc_toolchain_resolution flag enabled Bazel supports platform based toolchain selection for the cc toolchain. However, ctx.attr._cc_toolchain points to the toolchain that is configured via the old --crosstool_top flag, even if cc toolchain resolution is enabled. We need to use find_cpp_toolchain instead to access the correct toolchain in this case.

This is blocked by bazelbuild/bazel#6874
This is related to the hermetic nixpkgs provided cc toolchain tweag/rules_nixpkgs#128

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant