Skip to content

Add cargo_build_script.use_cc_toolchain#4161

Merged
krasimirgg merged 2 commits into
bazelbuild:mainfrom
UebelAndre:cargo_build_script
Jul 24, 2026
Merged

Add cargo_build_script.use_cc_toolchain#4161
krasimirgg merged 2 commits into
bazelbuild:mainfrom
UebelAndre:cargo_build_script

Conversation

@UebelAndre

@UebelAndre UebelAndre commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

This change introduces use_cc_toolchain to cargo_build_script which can be used to control whether or not a cc_toolchain is explicitly withheld from CargoBuildScript actions. Additionally a global flag --@rules_rust//cargo/settings:use_cc_toolchain can be used to control the default of any build script that has not either explicitly set use_cc_toolchain = 1 (always include cc toolchains) or use_cc_toolchain = 0 (always exclude cc toolchains).

closes #3680
closes #3679

@UebelAndre
UebelAndre force-pushed the cargo_build_script branch from 91faeef to 798ddcc Compare July 21, 2026 23:36
@UebelAndre
UebelAndre force-pushed the cargo_build_script branch from 798ddcc to bdf1c84 Compare July 22, 2026 14:10
@UebelAndre
UebelAndre marked this pull request as ready for review July 22, 2026 17:06

@krasimirgg krasimirgg left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you!

@krasimirgg
krasimirgg added this pull request to the merge queue Jul 24, 2026
Merged via the queue into bazelbuild:main with commit 5f04c8c Jul 24, 2026
2 checks passed
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 this pull request may close these issues.

Incompatible flag to stop merging the CC toolchain's all_files into rust toolchain's all_files

2 participants