[cfe-dev] ObjectiveC on Windows using the Apple Obj C runtime

Jim Crafton jim.crafton at gmail.com
Thu Jan 21 11:33:14 PST 2010

OK thanks. I can see that clang is responding to "-fnext-runtime", I
presume I just need to get llvm-ld to work now and I'm almost there.
Can llvm generate an exe directly or does it always have to go from
llvm bitcode to C code to native c compiler?



On Thu, Jan 21, 2010 at 2:24 PM, Chris Lattner <clattner at apple.com> wrote:
> On Jan 21, 2010, at 10:54 AM, Jim Crafton wrote:
>> Chris,
>> Thanks for the response. Ideally I'd like to be able to statically
>> compile code, and end with an exe I can just run. I put some printfs
>> in the clang code and CGObjCGNU code is getting used
>> (CreateGNUObjCRuntime is getting called) when I compile the test with
>> clang. Looking at the external functions it references, it seems they
>> are different from what Apple has in it's runtime. For example, the
>> CGObjCGNU::ModuleInitFunction() creates a reference to
>> "__objc_exec_class", which is non-existant in the apple runtime. Would
>> it be necessary to change things so that the CGObjMac class is used
>> instead of the CGObjCGNU?
> Yes, you'd need to use CGObjCMac to use the apple runtime.  I think that
> David is much more clueful and useful here than me though :)
> -Chris

More information about the cfe-dev mailing list