[llvm-bugs] [Bug 40140] New: clang-cl can't be used with midl
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Dec 22 16:28:05 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=40140
Bug ID: 40140
Summary: clang-cl can't be used with midl
Product: new-bugs
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: mh+llvm at glandium.org
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org
midl, a tool part of the Windows SDK, defaults to use cl.exe as a preprocessor.
One can override that with the /cpp_cmd flag to midl, and for people trying not
to depend on MSVC at all, it would seem like a good idea to pass clang-cl
there. But that doesn't work.
midl invokes the preprocessor with the following command line:
$preprocessor -E -D__midl=801 path/to/file.idl
with clang-cl, this fails because -E is ignored and the idl file is considered
as a linker input. So it warns about command line arguments being unused, and
gives no preprocessed output.
e.g.:
$ c:/Users/glandium/.mozbuild/clang/bin/clang-cl.exe -E -D__midl=801
c:/Users/glandium/Desktop/mozilla-unified/accessible/ipc/win/typelib/Accessible.idl
clang-cl: warning:
c:/Users/glandium/Desktop/mozilla-unified/accessible/ipc/win/typelib/Accessible.idl:
'linker' input unused [-Wunused-command-line-argument]
clang-cl: warning: argument unused during compilation: '-D __midl=801'
[-Wunused-command-line-argument]
--
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/20181223/174f741a/attachment.html>
More information about the llvm-bugs
mailing list