Commit Graph

8 Commits

Author SHA1 Message Date
Charles Brunet 4761e4cad9 Remove `get_buildtype_args` function
This is a first step to make `buildtype` a true alias of `debug` and
`optimization` options.

See #10808.

Relates to:
- #11645
- #12096
- #5920
- #5814
- #8220
- #8493
- #9540
- #10487
- #12265
- #8308
- #8214
- #7194
- #11732
2023-12-23 13:32:49 +02:00
Eli Schwartz 84dd78e80d
cython: wire up support for emitting and using depfiles
This solves rebuild issues when e.g. importing a .pxd header from a .pyx
file, just like C/C++ source headers. The transpiler needs to run again
in this case.

This functionality is present in the 3.0.0 alphas of cython, and is also
backported to 0.29.33.

Fixes #9049
2023-02-10 02:16:53 -05:00
Eli Schwartz 680b5ff819
treewide: add future annotations import 2023-02-01 17:01:30 -05:00
Xavier Claessens 06d12064d0 OptionOverrideProxy: Make it immutable to avoid copies
It is always used as an immutable view so there is no point in doing
copies. However, mypy insist it must implement the same APIs as
Dict[OptionKey, UserOption[Any]] so keep faking it.
2022-03-22 17:20:48 -04:00
Dylan Baker 68c23a6120 Add option to to transpile Cython to C++
This patch adds a new meson built-in option for cython, allowing it to
target C++ instead of C as the intermediate language. This can, of
course, be done on a per-target basis using the `override_options`
keyword argument, or for the entire project in the project function.

There are some things in this patch that are less than ideal. One of
them is that we have to add compilers in the build layer, but there
isn't a better place to do it because of per target override_options.
There's also some design differences between Meson and setuptools, in
that Meson only allows options on a per-target rather than a per-file
granularity.

Fixes #9015
2021-09-24 22:56:46 +03:00
Dylan Baker 0bc18f26a2 cython: Add an option for selecting python 3 vs python 2 output 2021-06-07 09:25:32 -07:00
Dylan Baker e9681b463d hack: compilers/cython: hardcode python 3 not 2 2021-06-07 09:15:13 -07:00
Dylan Baker 79e50caa7f compilers: Add a cython Compiler 2021-06-07 09:15:13 -07:00