Skip to content

Conversation

@dcbaker
Copy link
Member

@dcbaker dcbaker commented Sep 22, 2023

This means that any arguments given project wide or globally (such as preprocessor defines) will be set.

Fixes: #12065

@dcbaker dcbaker added the module:rust Specific to the Rust module label Sep 22, 2023
@dcbaker dcbaker added this to the 1.2.2 milestone Sep 22, 2023
@dcbaker dcbaker requested a review from jpakkane as a code owner September 22, 2023 20:43
@dcbaker dcbaker force-pushed the submit/bindgen-project-global-args branch 2 times, most recently from d00ca36 to b0066ad Compare September 23, 2023 19:49
@tristan957
Copy link
Member

Should this be a 1.3 PR instead?

@dcbaker dcbaker force-pushed the submit/bindgen-project-global-args branch from b0066ad to c301ccb Compare September 25, 2023 17:34
@dcbaker
Copy link
Member Author

dcbaker commented Sep 25, 2023

@tristan957 Not sure, the original issue was tagged for 1.2.2 so I tagged the commit as well.

I did just realize we should also be considering c_args/CFLAGS, so I updated with that added

This means that arguments set via `add_global_arguments`,
`add_project_arguments` and by either the `-Dc_args` or `CFLAGS` are
applied to bindgen as well. This can be important when, among other
things, #defines are set via these mechanisms.

Fixes: mesonbuild#12065
@dcbaker dcbaker force-pushed the submit/bindgen-project-global-args branch from c301ccb to e6dd580 Compare September 25, 2023 17:36
@dcbaker dcbaker requested a review from tristan957 September 25, 2023 17:37
@tristan957
Copy link
Member

I'll let you make the decision on how you want to target it. But LGTM

@dcbaker
Copy link
Member Author

dcbaker commented Sep 25, 2023

I'll leave it on 1.2.2, we can always move it to 1.3.0 if there is objection to merging it back.

@dcbaker dcbaker merged commit d5546bd into mesonbuild:master Sep 25, 2023
@dcbaker dcbaker deleted the submit/bindgen-project-global-args branch September 25, 2023 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:rust Specific to the Rust module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rust.bindgen doesn't respect project wide default options

2 participants