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

John McCall rjmccall at apple.com
Wed Jun 29 15:08:38 PDT 2011

On Jun 29, 2011, at 1:09 PM, David Chisnall wrote:
> 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.

I would welcome a driver patch which allowed users to specify a target runtime and min deployment version;  it could replace the existing -fgnu-runtime switch with something like -fobjc-runtime=macosx-10.6 or =gnustep-1.5 or whatever.

> 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.  

It's not the kernel version;  it's the system release version, which for Darwin's purposes implies a runtime version.


More information about the cfe-commits mailing list