aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/environment.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2019-04-21 13:10:02 -0700
committerJussi Pakkanen <jpakkane@gmail.com>2019-04-21 23:10:02 +0300
commit3edc7f343b938b9040c53004407f47f58fc15fcb (patch)
treebaa304e972aba33fb7135b223bc9c5e31a2cf911 /mesonbuild/environment.py
parentbffd28d4b22b685b2fcf5a5b5983e3f9c69102e7 (diff)
downloadmeson-3edc7f343b938b9040c53004407f47f58fc15fcb.zip
meson-3edc7f343b938b9040c53004407f47f58fc15fcb.tar.gz
meson-3edc7f343b938b9040c53004407f47f58fc15fcb.tar.bz2
coredata: store cross/native files in the same form they will be used (#5224)
* coredata: store cross/native files in the same form they will be used Currently they're forced to absolute paths when they're stored in the coredata datastructure, then when they're loaded we de-absolute path them to check if they're in the system wide directories. This doesn't work at all, since the ninja backend will generat a dependency on a file that is in the source directory unless the path was already given as absolute. This results in builds being retriggereed forever due to a non-existant file. The right way to do this is to figure out whether the file is in the build directory, is absolute, or is in one of the system paths at creation time, and store that path as absolute. Then the code that reads the file and the code that generates the dependencies in the ninja backend just takes the computed list and there is no mismatch between them. Fixes #5257 * run_unittests: Add a test for correct native file storage This tests the bug in #5257
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r--mesonbuild/environment.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index f85decd..c6e9a0c 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -422,13 +422,13 @@ class Environment:
if self.coredata.config_files is not None:
config = MesonConfigFile.from_config_parser(
- coredata.load_configs(self.coredata.config_files, 'native'))
+ coredata.load_configs(self.coredata.config_files))
self.binaries.build = BinaryTable(config.get('binaries', {}))
self.paths.build = Directories(**config.get('paths', {}))
if self.coredata.cross_files:
config = MesonConfigFile.from_config_parser(
- coredata.load_configs(self.coredata.cross_files, 'cross'))
+ coredata.load_configs(self.coredata.cross_files))
self.properties.host = Properties(config.get('properties', {}), False)
self.binaries.host = BinaryTable(config.get('binaries', {}), False)
if 'host_machine' in config: