diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-11-16 22:46:36 -0500 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2022-11-17 10:08:58 -0800 |
commit | 134e299eda28690c7f6b24fe80763103226b7c75 (patch) | |
tree | b5968345f5f3701bc0dbe115804c7359a52151b4 | |
parent | 68a84f6535de738a71efd9d413ca43371d165219 (diff) | |
download | meson-134e299eda28690c7f6b24fe80763103226b7c75.zip meson-134e299eda28690c7f6b24fe80763103226b7c75.tar.gz meson-134e299eda28690c7f6b24fe80763103226b7c75.tar.bz2 |
mdist: fix error when running tests with a cross file
Since commit 1420d0daceb10cafb52a7405f157032a5cc811a5 we use coredata's
cmd_line.txt handler to get the right setup arguments. But there's a bug
in that -- it mishandles cross/native files, producing invalid
descriptions of the command line. The only other place this was used,
though, is when generating meson-log.txt.
Fix it to produce correctly formatted arguments.
Fixes #10980
-rw-r--r-- | mesonbuild/coredata.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py index e7b2101..cdbf3c04 100644 --- a/mesonbuild/coredata.py +++ b/mesonbuild/coredata.py @@ -1035,9 +1035,9 @@ def update_cmd_line_file(build_dir: str, options: argparse.Namespace): def format_cmd_line_options(options: argparse.Namespace) -> str: cmdline = ['-D{}={}'.format(str(k), v) for k, v in options.cmd_line_options.items()] if options.cross_file: - cmdline += [f'--cross-file {f}' for f in options.cross_file] + cmdline += [f'--cross-file={f}' for f in options.cross_file] if options.native_file: - cmdline += [f'--native-file {f}' for f in options.native_file] + cmdline += [f'--native-file={f}' for f in options.native_file] return ' '.join([shlex.quote(x) for x in cmdline]) def major_versions_differ(v1: str, v2: str) -> bool: |