summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-08-04 19:47:30 +0200
committerDylan Baker <dylan@pnwbakers.com>2025-10-06 14:44:31 -0700
commitd2ffce63988f228d0bf5158093759fba774593e4 (patch)
tree09420580031d8e8ac7cf97c91114a7a4b7cd7cf4
parent99d7664965f36fd41520d66e73374879dd26935e (diff)
downloadmeson-d2ffce63988f228d0bf5158093759fba774593e4.tar.gz
coredata: remove dead code to set optimization and debug
Its caller, CoreData.set_option, calls OptionStore.set_option which already does the same. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--mesonbuild/coredata.py30
1 files changed, 0 insertions, 30 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index 1897799f4..8af2bfc13 100644
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -420,9 +420,6 @@ class CoreData:
raise MesonException(f'Tried to set unknown builtin option {str(key)}')
dirty |= changed
- if key.name == 'buildtype':
- dirty |= self._set_others_from_buildtype(value)
-
return dirty
def clear_cache(self) -> None:
@@ -460,33 +457,6 @@ class CoreData:
result.append(('debug', actual_debug, debug))
return result
- def _set_others_from_buildtype(self, value: str) -> bool:
- dirty = False
-
- if value == 'plain':
- opt = 'plain'
- debug = False
- elif value == 'debug':
- opt = '0'
- debug = True
- elif value == 'debugoptimized':
- opt = '2'
- debug = True
- elif value == 'release':
- opt = '3'
- debug = False
- elif value == 'minsize':
- opt = 's'
- debug = True
- else:
- assert value == 'custom'
- return False
-
- dirty |= self.optstore.set_option(OptionKey('optimization'), opt)
- dirty |= self.optstore.set_option(OptionKey('debug'), debug)
-
- return dirty
-
def get_external_args(self, for_machine: MachineChoice, lang: str) -> T.List[str]:
# mypy cannot analyze type of OptionKey
key = OptionKey(f'{lang}_args', machine=for_machine)