[llvm-bugs] [Bug 41379] New: clang produces ambiguous .d files
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Apr 4 08:16:23 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41379
Bug ID: 41379
Summary: clang produces ambiguous .d files
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: andrew at ziglang.org
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at metafoo.co.uk
Zig runs clang in a child process with `-MD -MF foo.d` and then parses `foo.d`
to find out the list of dependencies of the compilation.
The problem is that with or without `-MV`, the format is ambiguous.
Without -MV, on Windows, I saw this example file:
C:\msys64\home\andy\dev\zig\example\shared_library\zig-cache\tmp\CHLssWPWWG0d-test.obj:
\
C:\msys64\home\andy\dev\zig\example\shared_library\test.c \
C:\msys64\home\andy\dev\zig\example\shared_library\zig-cache\mathtest.h \
C:\Program\ Files\ (x86)\Microsoft\ Visual\
Studio\2017\Community\VC\Tools\MSVC\14.15.16726\lib\x64\\..\..\include\stdint.h
\
...
This is impossible to parse correctly - for example an escaped space is
indistinguishable from a path separator and then a space.
When I add `-MV`, the files are double-quote escaped, which fixes the issue.
However, `-MV` appears to not affect the "target", only the prerequisites. So
the problem remains for the target.
Downstream issue: https://github.com/ziglang/zig/issues/2046
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190404/2bce208b/attachment.html>
More information about the llvm-bugs
mailing list