[cfe-users] Clang-cl ... with objective-c?

Hans Wennborg hans at chromium.org
Mon May 5 15:10:31 PDT 2014

Hi Kevin,

On Sun, May 4, 2014 at 4:52 PM, Kevin Ingwersen
<ingwie2000 at googlemail.com> wrote:
> I am working on a project in which I would like to prefferabily use Objective-C. However, cl.exe obviously does not know what a .m or .mm file is (therefore it knows CSharp, which Clang does not know…). So I wanted to ask, if the cl driver (clang-cl) actually does Objective-C too? I was going to utilize the ObjFW project as library and runtime, so I wouldn’t even need anything else but a proper ObjC compiler.

The goal of clang-cl is to be a driver mode that's command-line
compatible with cl.exe. Since cl.exe doesn't support Objective-C, it's
not clear what it would mean to support that in a cl.exe compatible

Having said that, if you pass a .m file to clang-cl, it will probably
try to compile it as Cbjective-C, more by luck than by design. I have
no idea if the code that it produces is usable, though. I certainly
wouldn't rely on it for any real project.

I don't know much about Objective-C, especially on Windows. But why do
you want to use clang-cl instead of just regular clang?


More information about the cfe-users mailing list