summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-05-14 10:57:04 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2020-05-14 15:05:47 +0530
commit8b3e9ff3f77796aff80802ad60f633e6c093e4d8 (patch)
treec6f28f4f770b5dacd154984a09ef39ee54e27066
parent89c0eb2dadb732c0b8ae91c3f46deb918bb0be02 (diff)
downloadmeson-nirbheek/test-for-libdir-breakage.tar.gz
coredata: Fixup the default libdir value, not the set valuenirbheek/test-for-libdir-breakage
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.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)