X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=bin%2Fmeson-cmd-extract.py;h=b630885ed79cd0fc4eebd0183f2d9b89c0a87494;hb=034329128b703f8c2e8ad1980ddb131df372ce48;hp=61d6b406fbb743e06d3cba39761627a144bdfd2d;hpb=4a131a13303773d8b0e4d47e917b9c52d439146a;p=mesa.git 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)