diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2020-02-06 23:48:52 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-02-06 23:48:52 +0200 |
commit | b09f111d561aa44d0c482da7124d94a621865b3f (patch) | |
tree | 57652da26afa1f210346092a100ff36931f61681 /mesonbuild/interpreter.py | |
parent | 3ba0073df6014d4b594df052f8e1fa75ce17b20e (diff) | |
download | meson-revsp.tar.gz |
Revert "Make 'default_library' per-subproject builtin option"revsp
This reverts commit 3ba0073df6014d4b594df052f8e1fa75ce17b20e.
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r-- | mesonbuild/interpreter.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index d824e3c3a..74882b223 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -2750,21 +2750,19 @@ external dependencies (including libraries) must go to "dependencies".''') return result def get_option_internal(self, optname): - raw_optname = optname - if self.is_subproject(): - optname = self.subproject + ':' + optname - for opts in chain( [self.coredata.base_options, compilers.base_options, self.coredata.builtins], self.coredata.get_prefixed_options_per_machine(self.coredata.builtins_per_machine), self.coredata.get_prefixed_options_per_machine(self.coredata.compiler_options), ): v = opts.get(optname) - if v is None or v.yielding: - v = opts.get(raw_optname) if v is not None: return v + raw_optname = optname + if self.is_subproject(): + optname = self.subproject + ':' + optname + try: opt = self.coredata.user_options[optname] if opt.yielding and ':' in optname and raw_optname in self.coredata.user_options: @@ -2871,7 +2869,6 @@ external dependencies (including libraries) must go to "dependencies".''') if self.environment.first_invocation: default_options = self.project_default_options default_options.update(self.default_project_options) - self.coredata.init_builtins(self.subproject) else: default_options = {} self.coredata.set_default_options(default_options, self.subproject, self.environment) @@ -4371,7 +4368,7 @@ Try setting b_lundef to false instead.'''.format(self.coredata.base_options['b_s return BothLibrariesHolder(shared_holder, static_holder, self) def build_library(self, node, args, kwargs): - default_library = self.coredata.get_builtin_option('default_library', self.subproject) + default_library = self.coredata.get_builtin_option('default_library') if default_library == 'shared': return self.build_target(node, args, kwargs, SharedLibraryHolder) elif default_library == 'static': |