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

Syntax for passing kwargs to functions using the dictionary object #3819

Open
nirbheek opened this issue Jul 1, 2018 · 2 comments
Open

Syntax for passing kwargs to functions using the dictionary object #3819

nirbheek opened this issue Jul 1, 2018 · 2 comments

Comments

@nirbheek
Copy link
Member

nirbheek commented Jul 1, 2018

I have three main use-cases for this:

  1. Factoring out kwargs that are applied to a number of targets at once

  2. Conditionally setting kwargs based on

  3. The ability to write helper modules that will output kwargs for targets that follow a specific convention, such as a module for libtool naming and versioning, which many projects porting from Autotools need to maintain ABI compatibility. Currently all these projects duplicate code to calculate these and set them. Ex:

@nirbheek
Copy link
Member Author

nirbheek commented Jul 1, 2018

CCing interested parties: @MathieuDuponchelle @Akaricchi

@nirbheek
Copy link
Member Author

Idea from #4019:

Build the same library as static and shared with different c_args::

tspec = {
  'static': {'c_args': ['-DFOO_STATIC'], 'target_type': 'static_library'},
  'shared': {'c_args': [], 'target_type': 'shared_library'},
}
library('foo', sources, target_spec: tspec)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant