diff options
| author | Aleksey Gurtovoy <agurtovoy@acm.org> | 2019-08-09 16:06:47 -0500 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-09-05 23:42:47 +0300 |
| commit | 75daed27bc4e363696157617c7461414fc4e707b (patch) | |
| tree | 2863934de82e0a7cc6a3dcd9ee23b4c4e378c550 /mesonbuild/backend | |
| parent | caec875fe1922b40037e1fd9229433ede64f9f25 (diff) | |
| download | meson-75daed27bc4e363696157617c7461414fc4e707b.tar.gz | |
mesonlib.split_args/quote_arg/join_args
Diffstat (limited to 'mesonbuild/backend')
| -rw-r--r-- | mesonbuild/backend/ninjabackend.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index b948e25ea..98f244dad 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -14,7 +14,6 @@ from typing import List import os import re -import shlex import pickle import subprocess from collections import OrderedDict @@ -32,7 +31,7 @@ from .. import compilers from ..compilers import Compiler, CompilerArgs, CCompiler, VisualStudioLikeCompiler, FortranCompiler from ..linkers import ArLinker from ..mesonlib import ( - File, LibType, MachineChoice, MesonException, OrderedSet, PerMachine, ProgressBar + File, LibType, MachineChoice, MesonException, OrderedSet, PerMachine, ProgressBar, quote_arg ) from ..mesonlib import get_compiler_for_source, has_path_sep from .backends import CleanTrees @@ -44,11 +43,14 @@ FORTRAN_SUBMOD_PAT = r"^\s*\bsubmodule\b\s*\((\w+:?\w+)\)\s*(\w+)" FORTRAN_USE_PAT = r"^\s*use,?\s*(?:non_intrinsic)?\s*(?:::)?\s*(\w+)" if mesonlib.is_windows(): + # FIXME: can't use quote_arg on Windows just yet; there are a number of existing workarounds + # throughout the codebase that cumulatively make the current code work (see, e.g. Backend.escape_extra_args + # and NinjaBuildElement.write below) and need to be properly untangled before attempting this quote_func = lambda s: '"{}"'.format(s) execute_wrapper = ['cmd', '/c'] rmfile_prefix = ['del', '/f', '/s', '/q', '{}', '&&'] else: - quote_func = shlex.quote + quote_func = quote_arg execute_wrapper = [] rmfile_prefix = ['rm', '-f', '{}', '&&'] |
