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

modules/rust: Specify the compiler version to bindgen when possible #14030

Merged

Conversation

dcbaker
Copy link
Member

@dcbaker dcbaker commented Dec 20, 2024

bindgen by default may output code that an older rustc cannot successfully consume. To avoid this, we check if bindgen supports the rustc version we're using, if so, and if the user didn't set the --rust-target option, we will supply it to ensure that bindgen writes out code our rustc can use. If it does not support that version explicitly, we leave it at the default, assuming that our compiler version is newer than bindgen.

@dcbaker dcbaker requested a review from jpakkane as a code owner December 20, 2024 00:33
bindgen by default may output code that an older rustc cannot
successfully consume. To avoid this, we check if bindgen supports the
rustc version we're using, if so, and if the user didn't set the
`--rust-target` option, we will supply it to ensure that bindgen writes
out code our rustc can use. If it does not support that version
explicitly, we leave it at the default, assuming that our compiler
version is newer than bindgen.
@dcbaker dcbaker force-pushed the submit/bindgen-set-rust-target branch from 5ce1d91 to fbdeb4a Compare December 20, 2024 01:59
@eli-schwartz eli-schwartz merged commit 79fc894 into mesonbuild:master Dec 20, 2024
31 of 33 checks passed
@dcbaker dcbaker deleted the submit/bindgen-set-rust-target branch December 20, 2024 17:00
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.

2 participants