diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2025-11-13 11:38:08 -0800 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-11-19 10:48:48 -0800 |
| commit | 64535bbc821c0276ffe8c894502067a14229e10b (patch) | |
| tree | 5c6c7902158ff3dc9d8dbb889275faa867297615 /mesonbuild/compilers/compilers.py | |
| parent | 299136511e224676b29a2406349b32d86d4f2dd9 (diff) | |
| download | meson-64535bbc821c0276ffe8c894502067a14229e10b.tar.gz | |
compilers/rust: make use the fact we have an Environment to cleanup
This adds a second stage initialization, which allows us to use options
for setting attributes on the compiler. This is called during the detect
phase, so the Compiler is never used in a partially initialized state.
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
| -rw-r--r-- | mesonbuild/compilers/compilers.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 6b6dade7d..c09f5057a 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -496,6 +496,9 @@ class Compiler(HoldableObject, metaclass=abc.ABCMeta): # see :class:`Interpreter._redetect_machines()` return self.environment.machines[self.for_machine] + def init_from_options(self) -> None: + """Initializer compiler attributes that require options to be set.""" + def __repr__(self) -> str: repr_str = "<{0}: v{1} `{2}`>" return repr_str.format(self.__class__.__name__, self.version, |
