Feature: Accessing dependency compile flags etc from meson.build
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.6k
- Forks
- 1.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 33
Description
Hi,
For several custom targets I need to pass the -I flags necessary to parse some C sources (for various code generation purposes). Unfortunately it looks like there is no way to access compilation flags of dependencies from within meson.build, as Dependency.get_variable() unfortunately doesn't seems to allow accessing Dependency.compile_args.
I can implement a hacky workaround by parsing meson-info/intro-dependencies.json in a postconf script, but that's pretty grotty. Or I can re-implement dependency discovery outside of meson, also not appealing.
ISTM that at least Dependency.get_compile_args(), get_all_compile_args(), get_link_args(), get_all_link_args() should be exposed to the interpreter?
Regards,
Andres
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing Dependency.get_variable() and how dependency methods are exposed to the meson.build interpreter. Check the existing dependency compile and link argument handling, then verify that the requested compile- and link-argument accessors are available from meson.build with appropriate coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100