diff options
| author | Liza Chevalier <lizalc@pm.me> | 2025-10-29 11:17:00 -0500 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-10-29 12:35:55 -0700 |
| commit | ba860d72a96932608bb2b13a2f32ebda0087905a (patch) | |
| tree | d40fb1da7ea242673c6f7896c70be6ed12d6416e /mesonbuild/compilers/c.py | |
| parent | e9d255de1580235fff96e110001ce4293006caaa (diff) | |
| download | meson-ba860d72a96932608bb2b13a2f32ebda0087905a.tar.gz | |
compilers: add Microchip XC32 compiler
The Microchip XC32 compiler is a GCC-based compiler implemented using
existing GNU compiler classes. As the XC32 version and GCC version do
not match mixins have been implemented to override versions used in
versions checks where applicable.
Diffstat (limited to 'mesonbuild/compilers/c.py')
| -rw-r--r-- | mesonbuild/compilers/c.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index 424b61251..53ef28e13 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -15,7 +15,7 @@ from .c_function_attributes import C_FUNC_ATTRIBUTES from .mixins.apple import AppleCompilerMixin, AppleCStdsMixin from .mixins.clike import CLikeCompiler from .mixins.ccrx import CcrxCompiler -from .mixins.xc16 import Xc16Compiler +from .mixins.microchip import Xc16Compiler, Xc32Compiler, Xc32CStds from .mixins.compcert import CompCertCompiler from .mixins.ti import TICompiler from .mixins.arm import ArmCompiler, ArmclangCompiler @@ -643,6 +643,21 @@ class Xc16CCompiler(Xc16Compiler, CCompiler): path = '.' return ['-I' + path] + +class Xc32CCompiler(Xc32CStds, Xc32Compiler, GnuCCompiler): + + """Microchip XC32 C compiler.""" + + def __init__(self, ccache: T.List[str], exelist: T.List[str], version: str, for_machine: MachineChoice, is_cross: bool, + info: MachineInfo, + linker: T.Optional[DynamicLinker] = None, + defines: T.Optional[T.Dict[str, str]] = None, + full_version: T.Optional[str] = None): + GnuCCompiler.__init__(self, ccache, exelist, version, for_machine, is_cross, + info, linker=linker, full_version=full_version, defines=defines) + Xc32Compiler.__init__(self) + + class CompCertCCompiler(CompCertCompiler, CCompiler): def __init__(self, ccache: T.List[str], exelist: T.List[str], version: str, for_machine: MachineChoice, is_cross: bool, info: 'MachineInfo', |
