Commit f3d5fda
authored
[lldb][Windows] Fix ECHO_TO_FILE/ECHO_APPEND_FILE (llvm#202968)
The Windows recipes for these macros were printf "%s\n" $(1). The
callers wrap content in single quotes (for the POSIX printf), but the
test recipes run under cmd.exe on Windows, which keeps the single quotes
literal and word-splits on spaces, and the bundled printf additionally
mangles backslashes and spaces. The result is garbage generated files
(e.g. a modulemap whose first line is 'module, or a truncated SDK path
from a "Program Files" directory).
Write the file with cmd's echo after stripping the callers' single
quotes. echo runs in the recipe shell, so unlike GNU make's $(file ...)
it still works after a preceding MKDIR_P in the same recipe.
This is a reland of llvm#202612
which add the changes in the wrong if/else branch.
rdar://1792185451 parent e5d74b0 commit f3d5fda
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
0 commit comments