[PATCH] D29185: Allow llvm's build and test systems to support paths with spaces
ben via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 1 03:36:41 PST 2017
bd1976llvm added inline comments.
Comment at: test/lit.cfg:334
tool_path = llvm_tools_dir + '/' + tool_name
- config.substitutions.append((pattern, tool_pipe + tool_path))
+ config.substitutions.append((pattern, tool_pipe + lit.util.escapeSpaces(tool_path)))
> bd1976llvm wrote:
> > MatzeB wrote:
> > > Escaping spaces is probably a first step, but wouldn't we rather need a (posix?) shell escape mechanism? (maybe python shlex.quote/pipes.quote?)
> > We don't need one right now. Why not accept this as an improvement and leave the implementation of a more general escaping mechanism for when/if it is required in the future?
> +1, it should be the opposite of whatever the lit shell does for tokenization, which is roughly to follow bash quoting rules minus variable expansion.
Actually, the lit shell already knows that escape characters are different on windows and Linux. See: https://gitlab.crest.iu.edu/lvoufo/conceptclang/commit/e9201f5ced4ba3b19d4e548deb8e8d3b461f77ab. This patch just extends that idea to allow escape characters on windows rather than just ignoring them.
More information about the llvm-commits