diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2020-05-14 10:57:04 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2020-05-14 15:38:44 +0000 |
commit | 3e134975749b67b8c799a8b8fd065721de1cb48a (patch) | |
tree | 1c2949336674072bae3e3d933e8ad6c2148105aa | |
parent | cb97c3baf8fdb106574657f5b6a77016aba542d1 (diff) | |
download | meson-3e134975749b67b8c799a8b8fd065721de1cb48a.zip meson-3e134975749b67b8c799a8b8fd065721de1cb48a.tar.gz meson-3e134975749b67b8c799a8b8fd065721de1cb48a.tar.bz2 |
coredata: Fixup the default libdir value, not the set value
We shouldn't change the value of libdir after builtins have been
initialized because we want to change the *default* value.
-rw-r--r-- | mesonbuild/coredata.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py index 754be1d..8774b80 100644 --- a/mesonbuild/coredata.py +++ b/mesonbuild/coredata.py @@ -384,8 +384,8 @@ class CoreData: self.compiler_check_cache = OrderedDict() # Only to print a warning if it changes between Meson invocations. self.config_files = self.__load_config_files(options, scratch_dir, 'native') + self.builtin_options_libdir_cross_fixup() self.init_builtins('') - self.libdir_cross_fixup() @staticmethod def __load_config_files(options: argparse.Namespace, scratch_dir: str, ftype: str) -> T.List[str]: @@ -445,12 +445,12 @@ class CoreData: raise MesonException('Cannot find specified {} file: {}'.format(ftype, f)) return real - def libdir_cross_fixup(self): + def builtin_options_libdir_cross_fixup(self): # By default set libdir to "lib" when cross compiling since # getting the "system default" is always wrong on multiarch # platforms as it gets a value like lib/x86_64-linux-gnu. if self.cross_files: - self.builtins['libdir'].value = 'lib' + builtin_options['libdir'].default = 'lib' def sanitize_prefix(self, prefix): prefix = os.path.expanduser(prefix) |