aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/coredata.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2019-01-16 10:45:40 -0800
committerXavier Claessens <xclaesse@gmail.com>2019-01-17 13:21:00 -0500
commitdbe2a296378d93b55c93c2406744ff3de13af6f5 (patch)
tree1d90676ccaf9191f9a0dadd3c237946717ce66e2 /mesonbuild/coredata.py
parent8668a4e2ec8b7fc1b441d7c432f6cfcc0f0b4d02 (diff)
downloadmeson-dbe2a296378d93b55c93c2406744ff3de13af6f5.zip
meson-dbe2a296378d93b55c93c2406744ff3de13af6f5.tar.gz
meson-dbe2a296378d93b55c93c2406744ff3de13af6f5.tar.bz2
coredata: Serialize native files into the cmd_line.txt file
Because we need to store those as well.
Diffstat (limited to 'mesonbuild/coredata.py')
-rw-r--r--mesonbuild/coredata.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index 6fec61d..c7e3689 100644
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -615,6 +615,10 @@ def read_cmd_line_file(build_dir, options):
properties = config['properties']
if options.cross_file is None:
options.cross_file = properties.get('cross_file', None)
+ if not options.native_file:
+ # This will be a string in the form: "['first', 'second', ...]", use
+ # literal_eval to get it into the list of strings.
+ options.native_file = ast.literal_eval(properties.get('native_file', '[]'))
def write_cmd_line_file(build_dir, options):
filename = get_cmd_line_file(build_dir)
@@ -623,6 +627,8 @@ def write_cmd_line_file(build_dir, options):
properties = {}
if options.cross_file is not None:
properties['cross_file'] = options.cross_file
+ if options.native_file:
+ properties['native_file'] = options.native_file
config['options'] = options.cmd_line_options
config['properties'] = properties