diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2025-03-04 19:59:58 -0800 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2025-04-02 23:02:17 +0300 |
| commit | 3829b6f599c902dbf97130015d44a4daff11eefe (patch) | |
| tree | 13200da4284d27d4e31303f07841cf9b8d6143fc | |
| parent | 631486b8f68b152fdbf01c726bf4b0cb6bcbead3 (diff) | |
| download | meson-3829b6f599c902dbf97130015d44a4daff11eefe.tar.gz | |
options: Rename BASE_OPTIONS -> COMPILER_BASE_OPTIONS
Which better describes their purpose, especially now that this is in the
options module rather than the compilers module.
| -rw-r--r-- | mesonbuild/coredata.py | 4 | ||||
| -rw-r--r-- | mesonbuild/msetup.py | 4 | ||||
| -rw-r--r-- | mesonbuild/options.py | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py index d2dc4bb2e..6e270a4a9 100644 --- a/mesonbuild/coredata.py +++ b/mesonbuild/coredata.py @@ -640,7 +640,7 @@ class CoreData: # adding languages and setting backend. if self.optstore.is_compiler_option(k) or self.optstore.is_backend_option(k): continue - if self.optstore.is_base_option(k) and k.evolve(subproject=None) in options.BASE_OPTIONS: + if self.optstore.is_base_option(k) and k.evolve(subproject=None) in options.COMPILER_BASE_OPTIONS: # set_options will report unknown base options continue options_[k] = v @@ -686,7 +686,7 @@ class CoreData: else: skey = key if skey not in self.optstore: - self.optstore.add_system_option(skey, copy.deepcopy(options.BASE_OPTIONS[key])) + self.optstore.add_system_option(skey, copy.deepcopy(options.COMPILER_BASE_OPTIONS[key])) if skey in env.options: self.optstore.set_option(skey, env.options[skey]) elif subproject and key in env.options: diff --git a/mesonbuild/msetup.py b/mesonbuild/msetup.py index e6c68a9f9..bacb79b74 100644 --- a/mesonbuild/msetup.py +++ b/mesonbuild/msetup.py @@ -11,7 +11,7 @@ import typing as T from . import build, coredata, environment, interpreter, mesonlib, mintro, mlog from .mesonlib import MesonException -from .options import BASE_OPTIONS, OptionKey +from .options import COMPILER_BASE_OPTIONS, OptionKey if T.TYPE_CHECKING: from typing_extensions import Protocol @@ -204,7 +204,7 @@ class MesonApp: if coredata.optstore.is_compiler_option(opt): continue if (coredata.optstore.is_base_option(opt) and - opt.evolve(subproject=None, machine=mesonlib.MachineChoice.HOST) in BASE_OPTIONS): + opt.evolve(subproject=None, machine=mesonlib.MachineChoice.HOST) in COMPILER_BASE_OPTIONS): continue keystr = str(opt) if keystr in cmd_line_options: diff --git a/mesonbuild/options.py b/mesonbuild/options.py index 0107d09f2..8f71bc517 100644 --- a/mesonbuild/options.py +++ b/mesonbuild/options.py @@ -755,7 +755,7 @@ BUILTIN_DIR_NOPREFIX_OPTIONS: T.Dict[OptionKey, T.Dict[str, str]] = { MSCRT_VALS = ['none', 'md', 'mdd', 'mt', 'mtd'] -BASE_OPTIONS: T.Mapping[OptionKey, AnyOptionType] = { +COMPILER_BASE_OPTIONS: T.Mapping[OptionKey, AnyOptionType] = { OptionKey(o.name): o for o in T.cast('T.List[AnyOptionType]', [ UserBooleanOption('b_pch', 'Use precompiled headers', True), UserBooleanOption('b_lto', 'Use link time optimization', False), @@ -1091,7 +1091,7 @@ class OptionStore: def get_default_for_b_option(self, key: OptionKey) -> ElementaryOptionValues: assert self.is_base_option(key) try: - return T.cast('ElementaryOptionValues', BASE_OPTIONS[key.evolve(subproject=None)].default) + return T.cast('ElementaryOptionValues', COMPILER_BASE_OPTIONS[key.evolve(subproject=None)].default) except KeyError: raise MesonBugException(f'Requested base option {key} which does not exist.') |
