summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2025-02-26 10:55:52 -0800
committerJussi Pakkanen <jpakkane@gmail.com>2025-02-27 23:33:39 +0200
commite196f848c229a268428142d31b82065575881143 (patch)
tree00ea4d84826bd6f244f57f6484df7aa6e492882f /mesonbuild/compilers
parent3f430886dc29f2f80ca1556b9e0518f2a182f988 (diff)
downloadmeson-e196f848c229a268428142d31b82065575881143.tar.gz
compilers: delete dead code after option refactor
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r--mesonbuild/compilers/compilers.py26
1 files changed, 0 insertions, 26 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index 14f0a330d..c927293fb 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -272,17 +272,6 @@ def option_enabled(boptions: T.Set[OptionKey],
return False
-def get_option_value(options: options.OptionStore, opt: OptionKey, fallback: '_T') -> '_T':
- """Get the value of an option, or the fallback value."""
- try:
- v: '_T' = options.get_value(opt) # type: ignore [assignment]
- except (KeyError, AttributeError):
- return fallback
-
- assert isinstance(v, type(fallback)), f'Should have {type(fallback)!r} but was {type(v)!r}'
- # Mypy doesn't understand that the above assert ensures that v is type _T
- return v
-
def get_option_value_for_target(env: 'Environment', target: 'BuildTarget', opt: OptionKey, fallback: '_T') -> '_T':
"""Get the value of an option, or the fallback value."""
try:
@@ -295,21 +284,6 @@ def get_option_value_for_target(env: 'Environment', target: 'BuildTarget', opt:
return v
-def get_target_option_value(target: 'BuildTarget',
- env: 'Environment',
- opt: T.Union[OptionKey, str],
- fallback: '_T') -> '_T':
- """Get the value of an option, or the fallback value."""
- try:
- v = env.coredata.get_option_for_target(target, opt)
- except KeyError:
- return fallback
-
- assert isinstance(v, type(fallback)), f'Should have {type(fallback)!r} but was {type(v)!r}'
- # Mypy doesn't understand that the above assert ensures that v is type _T
- return v
-
-
def are_asserts_disabled(target: 'BuildTarget', env: 'Environment') -> bool:
"""Should debug assertions be disabled