summaryrefslogtreecommitdiff
path: root/mesonbuild/coredata.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-05-14 10:57:04 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2020-05-14 15:38:44 +0000
commit3e134975749b67b8c799a8b8fd065721de1cb48a (patch)
tree1c2949336674072bae3e3d933e8ad6c2148105aa /mesonbuild/coredata.py
parentcb97c3baf8fdb106574657f5b6a77016aba542d1 (diff)
downloadmeson-3e134975749b67b8c799a8b8fd065721de1cb48a.tar.gz
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.
Diffstat (limited to 'mesonbuild/coredata.py')
-rw-r--r--mesonbuild/coredata.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index 754be1dec..8774b8048 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)