Skip to content

Fix for wrong compiler executable when using custom toolchains #6419

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

Merged
merged 7 commits into from
Jun 13, 2024

Conversation

LeFrosch
Copy link
Collaborator

@LeFrosch LeFrosch commented May 6, 2024

Checklist

  • I have filed an issue about this change and discussed potential changes with the maintainers.
  • I have received the approval from the maintainers to make this change.
  • This is not a stylistic, refactoring, or cleanup change.

Please note that the maintainers will not be reviewing this change until all checkboxes are ticked. See
the Contributions section in the README for more
details.

Discussion thread for this change

Issue number: #6418

Description of this change

Fixes #6418 by using cc_common.get_tool_for_action to find the right c and cpp compiler executable.

Comment on lines 136 to 137
e -> e.getKey().getCppExecutable(),
e -> e.getValue().getCompilerVersion()));
e -> e.getKey().getCppCompiler(),
e -> e.getValue().getCppCompilerVersion()));
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This not correct and I already had a simple fix for BlazeCompilerInfoMapService. But maybe it is worth taking a closer look considering #6410. Since this would require more changes I would like to merge this first.

@LeFrosch LeFrosch changed the title Daniel.brauner/cpp toolchains 3 Fix for wrong compiler executable when using custom toolchains May 6, 2024
@LeFrosch LeFrosch force-pushed the Daniel.Brauner/cpp-toolchains-3 branch from 76adca9 to 78e49c0 Compare May 6, 2024 08:21
@LeFrosch LeFrosch requested a review from ujohnny May 6, 2024 08:34
@LeFrosch LeFrosch marked this pull request as ready for review May 6, 2024 08:35
@github-actions github-actions bot added product: CLion CLion plugin product: IntelliJ IntelliJ plugin product: GoLand GoLand plugin awaiting-review Awaiting review from Bazel team on PRs labels May 6, 2024
@LeFrosch LeFrosch force-pushed the Daniel.Brauner/cpp-toolchains-3 branch from 78e49c0 to a258a19 Compare May 27, 2024 12:25
Copy link
Collaborator

@ujohnny ujohnny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ujohnny ujohnny merged commit ca9c95e into bazelbuild:master Jun 13, 2024
@github-actions github-actions bot removed the awaiting-review Awaiting review from Bazel team on PRs label Jun 13, 2024
@LeFrosch LeFrosch deleted the Daniel.Brauner/cpp-toolchains-3 branch January 15, 2025 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product: CLion CLion plugin product: GoLand GoLand plugin product: IntelliJ IntelliJ plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLion does not find the right compiler when using a custom toolchain
5 participants