summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Weißmann <volker.weissmann@gmx.de>2025-03-19 19:28:39 +0100
committerDylan Baker <dylan@pnwbakers.com>2025-05-29 09:20:27 -0700
commitc90385363af591d52eacb6a2576d82bfeaf57039 (patch)
treedd63ddd035efbcca2f6b3c020a58b98c64af23b9
parent9c5c9745d02e2931e83e01ee6d055ccda6cfe14a (diff)
downloadmeson-c90385363af591d52eacb6a2576d82bfeaf57039.tar.gz
rewriter: Remove apparently useless code.
Without this commit, something like this crashes the static introspection/rewrite tool: ``` default_options : ['warning_level=' + run_command(['echo', '3']).stdout().strip()], ``` This commit does not reintroduce #14382.
-rw-r--r--mesonbuild/ast/introspection.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/mesonbuild/ast/introspection.py b/mesonbuild/ast/introspection.py
index b9299ab78..c74a76835 100644
--- a/mesonbuild/ast/introspection.py
+++ b/mesonbuild/ast/introspection.py
@@ -21,7 +21,6 @@ from .interpreter import AstInterpreter, IntrospectionBuildTarget, Introspection
if T.TYPE_CHECKING:
from ..build import BuildTarget
from ..interpreterbase import TYPE_var
- from ..options import OptionDict
from .visitor import AstVisitor
@@ -63,7 +62,6 @@ class IntrospectionInterpreter(AstInterpreter):
self.cross_file = cross_file
self.backend = backend
- self.default_options = {OptionKey('backend'): self.backend}
self.project_data: T.Dict[str, T.Any] = {}
self.targets: T.List[IntrospectionBuildTarget] = []
self.dependencies: T.List[IntrospectionDependency] = []
@@ -127,24 +125,6 @@ class IntrospectionInterpreter(AstInterpreter):
self._load_option_file()
- def_opts = self.flatten_args(kwargs.get('default_options', []))
- _project_default_options = mesonlib.stringlistify(def_opts)
- self.project_default_options = create_options_dict(_project_default_options, self.subproject)
- self.default_options.update(self.project_default_options)
- if self.environment.first_invocation or (self.subproject != '' and self.subproject not in self.coredata.initialized_subprojects):
- if self.subproject == '':
- self.coredata.optstore.initialize_from_top_level_project_call(
- T.cast('OptionDict', self.project_default_options),
- {}, # TODO: not handled by this Interpreter.
- self.environment.options)
- else:
- self.coredata.optstore.initialize_from_subproject_call(
- self.subproject,
- {}, # TODO: this isn't handled by the introspection interpreter...
- T.cast('OptionDict', self.project_default_options),
- {}) # TODO: this isn't handled by the introspection interpreter...
- self.coredata.initialized_subprojects.add(self.subproject)
-
if not self.is_subproject() and 'subproject_dir' in kwargs:
spdirname = kwargs['subproject_dir']
if isinstance(spdirname, StringNode):