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

RFC: what happens when c_args/ld_args come from multiple locations? [skip ci] #6362

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

Conversation

marc-h38
Copy link
Contributor

@marc-h38 marc-h38 commented Dec 17, 2019

Combinatorial explosion and... some documentation gaps?

The main confusion is:

Some c_args definitions append to each other, others override each other. Which/when/why/how?

While this is technically a PR, consider it more like a github issue with a lot of sample test code.

I searched the documentation for all the different ways to define {cpp,c,ld}_args and the relationships between them. However what I found was scattered across the documentation: no single, high-level list or overview. It seemed sometimes incomplete.

I searched github for the same topic (some links below) but that didn't really help either because most of github is or was of course "work in progress" (the difference between "is" and "was" not always obvious) For instance #4767 states:

All cross compilation arguments come from the cross file".

Except: -D, project(default_options: c_args...), executable( c_args, native:false),...

Then I searched for some sort of "c_args test code". That would be in a less natural language but never obsolete as github issues and PRs become. As I couldn't find any c_args test code, I wrote this one. While tedious, this helped me understand some of the situation better.

I'm not sure exactly where to take this next.

A new, "<lang>_args hub" documentation node with an organized list of pointers would probably go a long way.

Another good thing would be to upgrade this prototype test code to fully automated tests and it's probably not too far from that, except for this difficult question: which particular combinations of c_args inputs should be tested? Can't test everything due to the number of locations and the combinatorial explosion.

…skip ci]

Combinatorial explosion and... some documentation gaps?

Consider this is as a github issue with a lot of code.

I tried to find in the documentation all the places {cpp,c,ld}_args
could be set and the relationships between these places. However what I
found was scattered in the corresponding places - no single, high-level
list or overview - and seemed sometimes incomplete.

I searched github for the same topic but that didn't really help either
because most of it is or was of course "work in progress" (the
difference between "is" and "was" being not always immediately obvious)
For instance mesonbuild#4767 states "All
cross compilation arguments come from the cross file". Except for: -D,
project(default_options: c_args...), executable( c_args, native:false),...

Then I looked for some relevant test code that would be in a less
natural language but necessarily in sync with the current
implementation. I couldn't really find any, so I wrote this (long)
sample. While tedious, this helped me understand some of the situation
better.

I'm not sure exactly where to take this next. A new, "<lang>_args hub"
documentation node with an organized list of pointers would probably not
hurt. Another cool thing would be to convert some of this to fully
automated tests and it's probably not too far from it, except for the
important question of: what particular combinations should be tested?
Can't test everything due to the number of locations and the
combinatorial explosion.
@marc-h38 marc-h38 changed the title RFC: what happens when c_args/ld_args come from multiple locations? [… RFC: what happens when c_args/ld_args come from multiple locations? [skip ci] Dec 17, 2019
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.

None yet

1 participant