[patch][cmake] get host OS X version "10.X"

David Fang fang at csl.cornell.edu
Tue Mar 11 13:16:19 PDT 2014

Currently, my only uses for this in the LLVM tree is to conditionally 
replace @rpath with @loader_path, which has been working fine on darwin8.
In the compiler-rt tree, I use the detected OS X version as the deployment 
target instead of the hardcoded values, since I'm not trying to target 
the runtime libraries for older OS versions.  Those can just all live 


> +function( get_host_osx_version var )
> +  if( APPLE )
> The "if (APPLE) " is probably redundant since this is clearly a OS X
> only function.
> It is small, so I am not opposed to it, but it should probably go in
> with its first use so it is not garbage collect.
> Cheers,
> Rafael
> On 28 February 2014 14:33, David Fang <fang at csl.cornell.edu> wrote:
>> Hi,
>>         I've been using this patch to get host OS X version for
>> conditionalizing other cmake pieces on darwin version.  (For my nefarious
>> purposes of keeping darwin8 alive.)
>>         Any interest in this patch?
>> David
>> --
>> David Fang
>> http://www.csl.cornell.edu/~fang/
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

David Fang

More information about the llvm-commits mailing list