summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-06-20 18:32:45 +0200
committerJussi Pakkanen <jussi.pakkanen@mailbox.org>2025-10-29 18:59:30 +0200
commitc6f4dc776166a8e34c80eb7f915e956a6f2d9de9 (patch)
tree1e23cb5d70f76bbaefb6d07b6699c3b826983d17
parent97477e3aae0201bd679dfd787c83f3bd6026eb0c (diff)
downloadmeson-c6f4dc776166a8e34c80eb7f915e956a6f2d9de9.tar.gz
build: remove unnecessary try/except
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--mesonbuild/build.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index c80861c84..777eca164 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -2412,10 +2412,7 @@ class StaticLibrary(BuildTarget):
suffix = 'a'
if 'c' in self.compilers and self.compilers['c'].get_id() == 'tasking' and not self.prelink:
key = OptionKey('b_lto', self.subproject, self.for_machine)
- try:
- v = self.environment.coredata.get_option_for_target(self, key)
- except KeyError:
- v = self.environment.coredata.optstore.get_value_for(key)
+ v = self.environment.coredata.get_option_for_target(self, key)
assert isinstance(v, bool), 'for mypy'
if v:
suffix = 'ma'