diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2019-01-16 10:45:40 -0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2019-01-17 13:21:00 -0500 |
commit | dbe2a296378d93b55c93c2406744ff3de13af6f5 (patch) | |
tree | 1d90676ccaf9191f9a0dadd3c237946717ce66e2 | |
parent | 8668a4e2ec8b7fc1b441d7c432f6cfcc0f0b4d02 (diff) | |
download | meson-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.
-rw-r--r-- | mesonbuild/coredata.py | 6 |
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 |