[cfe-commits] r134066 - /cfe/trunk/include/clang/Driver/ToolChain.h

David Chisnall csdavec at swan.ac.uk
Wed Jun 29 13:09:27 PDT 2011


On 29 Jun 2011, at 20:42, John McCall wrote:

> On Jun 29, 2011, at 6:17 AM, David Chisnall wrote:
>> Author: theraven
>> Date: Wed Jun 29 08:17:23 2011
>> New Revision: 134066
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=134066&view=rev
>> Log:
>> Make ARC support default to true.  Please can we stop making Objective-C runtime features part of the platform description?  This only makes sense for Darwin.
> 
> At the time this code was added, it was not true;  you are saying it is now true, so the driver needs to be updated to reflect that.  This seems completely reasonable to me.
> 
> And I would argue that *every* platform has fixed Objective-C runtimes.  Again, you are assuming that everyone compiling and deploying an Objective-C program is willing to require that the entire Objective-C runtime and library stack be updated to the absolute latest revision on every deployment machine.  This would certainly not be a reasonable assumption about any other language runtime.

My point is that, apart from on Darwin, the installed Objective-C runtime is not part of the platform description.  If you are targeting Linux or Windows, then there are at least three Objective-C runtimes that you might be using.  

Even on Darwin it doesn't make much sense.  The GCC runtime works on Darwin - if someone installs the GCC 4.6 runtime on OS X, then clang will refuse to use features that are not supported by the version of the runtime that the version of Apple libobjc that ships with the OS does not support. 

This might almost make sense for selecting defaults, but in the case of ARC and GC the platform description hard codes the feature set supported by the installed libobjc based on the kernel version, which makes no sense at all.  

David



More information about the cfe-commits mailing list