diff options
| author | Reid Kleckner <rnk@google.com> | 2016-10-20 20:02:24 +0000 |
|---|---|---|
| committer | Reid Kleckner <rnk@google.com> | 2016-10-20 20:02:24 +0000 |
| commit | 613c00db88e0a206e1223e5be7dfeb9b4a868c7d (patch) | |
| tree | 9ed4d822f2cafc1600d80d49ce5bc9e608c9d068 | |
| parent | 2d38ae6c415c92207239ce3be11c244dd3ddba66 (diff) | |
| download | bcm5719-llvm-613c00db88e0a206e1223e5be7dfeb9b4a868c7d.tar.gz bcm5719-llvm-613c00db88e0a206e1223e5be7dfeb9b4a868c7d.zip | |
Add a space to work around a Windows CPython / MSys quoting bug
Summary:
The rules for quoting the command line that a subprocess receives are
user space conventions implemented by the C runtime. Python's quoting
rules are implemented here:
https://github.com/python/cpython/blob/c30098c8c6014f3340a369a31df9c74bdbacc269/Lib/subprocess.py#L725
The result is that the final command line C string computed by Python is
'echo \"'. Mingw doesn't appear to interpret that backslash as escaping
the quote because it is not already inside a quoted region. As a result,
our echo command prints a single backslash instead of a quote.
The whole issue can be sidestepped by adding a space a forcing Python to
put the argument to echo in double quotes.
Reviewers: inglorion, ruiu
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D25841
llvm-svn: 284768
| -rw-r--r-- | lld/test/ELF/libsearch.s | 2 | ||||
| -rw-r--r-- | lld/test/ELF/version-script-err.s | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lld/test/ELF/libsearch.s b/lld/test/ELF/libsearch.s index 63a57f77eb4..92c5805fbc0 100644 --- a/lld/test/ELF/libsearch.s +++ b/lld/test/ELF/libsearch.s @@ -90,7 +90,7 @@ // RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=DYNAMIC %s // -nostdlib -// RUN: echo 'SEARCH_DIR("'%t.dir'")' > %t.script +// RUN: echo ' SEARCH_DIR("'%t.dir'")' > %t.script // RUN: ld.lld -o %t3 %t.o -script %t.script -lls // RUN: not ld.lld -o %t3 %t.o -script %t.script -lls -nostdlib \ // RUN: 2>&1 | FileCheck --check-prefix=NOSTDLIB %s diff --git a/lld/test/ELF/version-script-err.s b/lld/test/ELF/version-script-err.s index 15b69e98505..60e9ae72047 100644 --- a/lld/test/ELF/version-script-err.s +++ b/lld/test/ELF/version-script-err.s @@ -4,7 +4,7 @@ // RUN: not ld.lld -shared %t.o -o %t.so --version-script %p/Inputs/version-script-err.script 2>&1 | FileCheck %s // CHECK: ; expected, but got } -// RUN: echo "\"" > %terr1.script +// RUN: echo " \"" > %terr1.script // RUN: not ld.lld --version-script %terr1.script -shared %t.o -o %t.so 2>&1 | \ // RUN: FileCheck -check-prefix=ERR1 %s // ERR1: unclosed quote |

