summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorDylan Baker <[email protected]>2019-01-16 14:51:38 -0800
committerDylan Baker <[email protected]>2019-01-18 09:37:01 -0800
commit9e989b860aada39a559fcd47d2a0cbfcd75e81fa (patch)
tree248d4010718a482f07bb7e81c50b3ffee65e710d /bin
parentb54df1b6dfc37043ee6d9f5297fc29b6ca808f00 (diff)
bin/meson-cmd-extract: Also handle cross and native files
Native file support in command line serialization isn't present in meson 0.49, but will be for 0.49.1 and 0.50 Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/meson-cmd-extract.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/meson-cmd-extract.py b/bin/meson-cmd-extract.py
index 61d6b406fbb..b630885ed79 100755
--- a/bin/meson-cmd-extract.py
+++ b/bin/meson-cmd-extract.py
@@ -26,6 +26,7 @@ This only works for meson 0.49.0 and newer.
"""
import argparse
+import ast
import configparser
import pathlib
import sys
@@ -57,6 +58,16 @@ def build_cmd(conf: configparser.ConfigParser) -> str:
args.append(f'-D{k}="{v}"')
else:
args.append(f'-D{k}={v}')
+
+ cf = conf['properties'].get('cross_file')
+ if cf:
+ args.append('--cross-file={}'.format(cf))
+ nf = conf['properties'].get('native_file')
+ if nf:
+ # this will be in the form "['str', 'str']", so use ast.literal_eval to
+ # convert it to a list of strings.
+ nf = ast.literal_eval(nf)
+ args.extend(['--native-file={}'.format(f) for f in nf])
return ' '.join(args)