aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/environment.py
diff options
context:
space:
mode:
authorJohn Ericson <git@JohnEricson.me>2018-11-28 01:48:57 -0500
committerJohn Ericson <John.Ericson@Obsidian.Systems>2019-01-02 16:22:47 -0500
commite147054d6f8b78b306125fd785603ca0519fdfc1 (patch)
treecde01f813bff018f3df615bff7276b8fa9d88b06 /mesonbuild/environment.py
parentedb3585b65f6a1f36c3b4d39d92e049c49c8837e (diff)
downloadmeson-e147054d6f8b78b306125fd785603ca0519fdfc1.zip
meson-e147054d6f8b78b306125fd785603ca0519fdfc1.tar.gz
meson-e147054d6f8b78b306125fd785603ca0519fdfc1.tar.bz2
Get rid of `ConfigData`
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r--mesonbuild/environment.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index b48868c..b10f826 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -346,16 +346,17 @@ class Environment:
# Similar to coredata.compilers and build.compilers, but lower level in
# that there is no meta data, only names/paths.
self.binaries = PerMachineDefaultable()
+ # Just uses hard-coded defaults and environment variables. Might be
+ # overwritten by a native file.
+ self.binaries.build = BinaryTable({})
# Misc other properties about each machine.
self.properties = PerMachine(Properties(), Properties(), Properties())
if self.coredata.config_files is not None:
- config_info = coredata.ConfigData(
+ config = MesonConfigFile.from_config_parser(
coredata.load_configs(self.coredata.config_files))
- else:
- config_info = coredata.ConfigData()
- self.binaries.build = BinaryTable(config_info.binaries)
+ self.binaries.build = BinaryTable(config.get('binaries', {}))
if self.coredata.cross_file is not None:
config = MesonConfigFile.parse_datafile(self.coredata.cross_file)
@@ -1168,6 +1169,8 @@ class MesonConfigFile:
section = {}
for entry in parser[s]:
value = parser[s][entry]
+ # Windows paths...
+ value = value.replace('\\', '\\\\')
if ' ' in entry or '\t' in entry or "'" in entry or '"' in entry:
raise EnvironmentException('Malformed variable name %s in cross file..' % entry)
try: