Skip to content

Conversation

@dcbaker
Copy link
Member

@dcbaker dcbaker commented Jan 9, 2026

This will look for --target and --target= in the configured rust command, but only if --target or --target= has not been passed in the bindgen_clang_args of the machine file.

TODO: still needs tests.

Fixes: #13591

@dcbaker dcbaker added this to the 1.11 milestone Jan 9, 2026
@anholt
Copy link

anholt commented Jan 15, 2026

Logic looks good to me.

@dcbaker dcbaker force-pushed the submit/bindgen-extract-rust-target branch from a12789e to 1853b04 Compare January 16, 2026 19:07
@dcbaker dcbaker marked this pull request as ready for review January 16, 2026 19:07
@dcbaker dcbaker requested a review from jpakkane as a code owner January 16, 2026 19:07
@dcbaker dcbaker force-pushed the submit/bindgen-extract-rust-target branch 3 times, most recently from 57f8adb to 464f988 Compare January 16, 2026 19:53
@dcbaker dcbaker force-pushed the submit/bindgen-extract-rust-target branch from 464f988 to 4ce6021 Compare January 16, 2026 20:40
@dcbaker dcbaker force-pushed the submit/bindgen-extract-rust-target branch from 4ce6021 to 3b33305 Compare January 22, 2026 19:33
This will look for `--target` and `--target=` in the configured rust
command, but only if `--target` or `--target=` has not been passed in
the bindgen_clang_args of the machine file.

I've added a unittest for this that tests all four possible conditions.
I've used a new custom test that is minimal rather than reusing the
bindgen test in the rust directory, as it cuts this test's runtime in
half doing so.

Fixes: mesonbuild#13591
Co-authored-by: Daniele Nicolodi <[email protected]>
@dcbaker dcbaker force-pushed the submit/bindgen-extract-rust-target branch from b0c2fd8 to ff155ef Compare January 22, 2026 20:28
@dcbaker
Copy link
Member Author

dcbaker commented Jan 23, 2026

I'm planning to merge this Monday unless there objections before then

@dcbaker dcbaker merged commit 1d6dc4b into mesonbuild:master Jan 27, 2026
31 checks passed
@dcbaker dcbaker deleted the submit/bindgen-extract-rust-target branch January 27, 2026 23:07
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.

rustc target argument isn't passed to bindgen

3 participants