diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-04-27 12:25:23 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-06-07 09:17:39 -0700 |
commit | b9f33c2380d6d8a306ef99f35536f196a08d52e3 (patch) | |
tree | f8b15e91783187f2526edf2a2b2f97c044d40eb3 | |
parent | ec4d8143df11871beeaf58aea6f031a088ab3cfe (diff) | |
download | meson-b9f33c2380d6d8a306ef99f35536f196a08d52e3.zip meson-b9f33c2380d6d8a306ef99f35536f196a08d52e3.tar.gz meson-b9f33c2380d6d8a306ef99f35536f196a08d52e3.tar.bz2 |
Add C compiler when using Cython
Since cython transpiles to C.
-rw-r--r-- | mesonbuild/build.py | 2 | ||||
-rw-r--r-- | mesonbuild/interpreter/interpreter.py | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 942927c..bc86fe3 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -812,7 +812,7 @@ class BuildTarget(Target): # If all our sources are Vala, our target also needs the C compiler but # it won't get added above. - if 'vala' in self.compilers and 'c' not in self.compilers: + if ('vala' in self.compilers or 'cython' in self.compilers) and 'c' not in self.compilers: self.compilers['c'] = compilers['c'] def validate_sources(self): diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py index ecaeb7a..eff76be 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -1193,8 +1193,9 @@ external dependencies (including libraries) must go to "dependencies".''') args = [a.lower() for a in args] langs = set(self.coredata.compilers[for_machine].keys()) langs.update(args) - if 'vala' in langs and 'c' not in langs: - FeatureNew('Adding Vala language without C', '0.59.0').use(self.subproject) + if ('vala' in langs or 'cython' in langs) and 'c' not in langs: + if 'vala' in langs: + FeatureNew.single_use('Adding Vala language without C', '0.59.0', self.subproject) args.append('c') success = True |