summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/objcpp.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2025-10-31 10:24:23 -0700
committerDylan Baker <dylan@pnwbakers.com>2025-11-19 10:48:48 -0800
commita6c4a4d7e867db4f98db1127d1246c43c5c7a863 (patch)
treebd70a8701333f1238fa2b8c99e3a818dd82ab949 /mesonbuild/compilers/objcpp.py
parent12b1e3c6a72b715bf20e4c304da065e16c510830 (diff)
downloadmeson-a6c4a4d7e867db4f98db1127d1246c43c5c7a863.tar.gz
compilers: Pass Environment instead of MachineInfo
We end up needing it everywhere, so just store it. This patch is huge already, so it's just the conversion to passing Environment, more cleanups to come.
Diffstat (limited to 'mesonbuild/compilers/objcpp.py')
-rw-r--r--mesonbuild/compilers/objcpp.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/mesonbuild/compilers/objcpp.py b/mesonbuild/compilers/objcpp.py
index 441428b2f..d205dd1fc 100644
--- a/mesonbuild/compilers/objcpp.py
+++ b/mesonbuild/compilers/objcpp.py
@@ -15,7 +15,6 @@ from .mixins.clang import ClangCompiler, ClangCPPStds
from .mixins.clike import CLikeCompiler
if T.TYPE_CHECKING:
- from ..envconfig import MachineInfo
from ..environment import Environment
from ..linkers.linkers import DynamicLinker
from ..mesonlib import MachineChoice
@@ -28,10 +27,10 @@ class ObjCPPCompiler(CLikeCompiler, Compiler):
language = 'objcpp'
def __init__(self, ccache: T.List[str], exelist: T.List[str], version: str, for_machine: MachineChoice,
- is_cross: bool, info: 'MachineInfo',
+ is_cross: bool, env: Environment,
linker: T.Optional['DynamicLinker'] = None,
full_version: T.Optional[str] = None):
- Compiler.__init__(self, ccache, exelist, version, for_machine, info,
+ Compiler.__init__(self, ccache, exelist, version, for_machine, env,
is_cross=is_cross, full_version=full_version,
linker=linker)
CLikeCompiler.__init__(self)
@@ -65,12 +64,12 @@ class ObjCPPCompiler(CLikeCompiler, Compiler):
class GnuObjCPPCompiler(GnuCPPStds, GnuCompiler, ObjCPPCompiler):
def __init__(self, ccache: T.List[str], exelist: T.List[str], version: str, for_machine: MachineChoice,
- is_cross: bool, info: 'MachineInfo',
+ is_cross: bool, env: Environment,
defines: T.Optional[T.Dict[str, str]] = None,
linker: T.Optional['DynamicLinker'] = None,
full_version: T.Optional[str] = None):
ObjCPPCompiler.__init__(self, ccache, exelist, version, for_machine, is_cross,
- info, linker=linker, full_version=full_version)
+ env, linker=linker, full_version=full_version)
GnuCompiler.__init__(self, defines)
default_warn_args = ['-Wall', '-Winvalid-pch']
self.warn_args = {'0': [],
@@ -96,12 +95,12 @@ class GnuObjCPPCompiler(GnuCPPStds, GnuCompiler, ObjCPPCompiler):
class ClangObjCPPCompiler(ClangCPPStds, ClangCompiler, ObjCPPCompiler):
def __init__(self, ccache: T.List[str], exelist: T.List[str], version: str, for_machine: MachineChoice,
- is_cross: bool, info: 'MachineInfo',
+ is_cross: bool, env: Environment,
defines: T.Optional[T.Dict[str, str]] = None,
linker: T.Optional['DynamicLinker'] = None,
full_version: T.Optional[str] = None):
ObjCPPCompiler.__init__(self, ccache, exelist, version, for_machine, is_cross,
- info, linker=linker, full_version=full_version)
+ env, linker=linker, full_version=full_version)
ClangCompiler.__init__(self, defines)
default_warn_args = ['-Wall', '-Winvalid-pch']
self.warn_args = {'0': [],