diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2019-01-16 10:45:40 -0800 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2019-01-22 16:29:09 +0530 |
commit | 1d0f812b1d95fb0bbcb9bb9c0dcd51e56881d3f0 (patch) | |
tree | 9d870e1b116bca7067677c925e9f85c7fd4ecfb6 | |
parent | d82c0ea84550d9336c53024f1c35fd5f7e046fc7 (diff) | |
download | meson-1d0f812b1d95fb0bbcb9bb9c0dcd51e56881d3f0.zip meson-1d0f812b1d95fb0bbcb9bb9c0dcd51e56881d3f0.tar.gz meson-1d0f812b1d95fb0bbcb9bb9c0dcd51e56881d3f0.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 e79e398..50e6b34 100644 --- a/mesonbuild/coredata.py +++ b/mesonbuild/coredata.py @@ -560,6 +560,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) @@ -568,6 +572,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 |