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

compilers: Pass all options to links/compiles #13687

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

amcn
Copy link
Contributor

@amcn amcn commented Sep 17, 2024

The compiler.links() and compiler.compiles() functions did not take into account all arguments which might be added to a real link or real compile job, specifically it was failing to add many of the options which are added as a result of language level options such as b_coverage or b_sanitize.

This commit fixes that by constructing the args list for these functions using the same methods as a real compile/link job.

A new unittest has been added to check that this is functioning correctly.

Fixes: #13610

@amcn amcn requested a review from jpakkane as a code owner September 17, 2024 21:04
@amcn
Copy link
Contributor Author

amcn commented Sep 17, 2024

I'm fairly sure that #13610 is an oversight in meson that should be fixed but I'm not at all sure that the approach that I have taken to fix it in this PR is the right one.

With that in mind, your feedback is invaluable.

The `compiler.links()` and `compiler.compiles()` functions did
not take into account all arguments which might be added to a real link or
real compile job, specifically it was failing to add many of the options
which are added as a result of language level options such as `b_coverage`
or `b_sanitize`.

This commit fixes that by constructing the args list for these functions
using the same methods as a real compile/link job.

A new unittest has been added to check that this is functioning correctly.

Fixes: mesonbuild#13610
@amcn amcn force-pushed the amcn/compiler_funcs_get_all_args branch from 819f063 to 1fab41c Compare September 17, 2024 21:31
@amcn
Copy link
Contributor Author

amcn commented Sep 17, 2024

As test failures can attest, this needs more time to cook. Converting to draft until it's ready.

@amcn amcn marked this pull request as draft September 17, 2024 22:03
@amcn amcn marked this pull request as draft September 17, 2024 22:03
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.

Coverage flags are not passed to compiler test methods (links(), has_function())
1 participant