[LLVMdev] Status of blocks runtime in compiler-rt?

Shantonu Sen ssen at apple.com
Wed Sep 16 08:00:31 PDT 2009


The Blocks language and implementation specifications are checked into  
clang/docs.

More generally, on Mac OS X, the blocks runtime is linked into the C  
library ("libSystem"), and available to the entire OS. Clients that  
create blocks may implicitly get compiler-generated calls to some of  
the runtime functions, and the developer may also make explicit calls  
to, e.g., Block_copy().

On other OSes, the library would need to be built and installed  
somewhere. There's also the question of whether it should be a shared  
library or static library. I can see both points, but think that a  
shared library is probably the right way for it.

It should probably be generally portable (it doesn't appear to  
compiler correctly with llvm-gcc and clang on Linux), and install its  
headers (doesn't appear to).

I can spend some time on this, since I have some familiarity with  
libdispatch (Apple's APIs that heavily use Blocks for developer  
convenience).

Shantonu

Sent from my MacBook

On Sep 15, 2009, at 4:42 PM, Edward O'Callaghan wrote:

> Good day,
>
> I been working on the CMake build system (which is nice and portable)
> + code clean ups over the whole Compiler-RT software suit.
> I recently added Blocks to the CMake build system but there is some
> ugly looking warnings I need to fix up in the Blocks code which I have
> not had time to look into yet.
> N.B. The CMake build system is not complete yet due to my lack of
> time, however I am still active, help really welcome !
>
> My main goal is to have Compiler-RT as a highly portable runtime that
> will build and run on AuroraUX, *BSD, Linux and OSX with lint clean
> code and zero build warnings. Also, I plan to add SPARC support in the
> near future if I get time. (As I work on AuroraUX almost full time
> also.)
>
> These are my personal goals working on Compiler-RT.
>
> Could you please outline *exactly* what you would like to see happen
> with Blocks,
> I don't really know much about Blocks to be fair however I would be
> interested to hear and at least it would be 'on record' here.
>
> Cheers,
> Edward O'Callaghan.
>
> 2009/9/15 Jordan K. Hubbard <jkh at apple.com>:
>> Hi folks,
>>
>> So, various folks are in the process of porting Grand Central  
>> Dispatch
>> to FreeBSD (c.f. http://libdispatch.macosforge.org and http://lists.macosforge.org/pipermail/libdispatch-dev
>>  for mailing list discussion on the topic) and are making good
>> progress, but one of the issues they're running into is support for
>> Blocks in FreeBSD.
>>
>> On the one hand, they could try and back-port the gcc changes from http://www.opensource.apple.com/source/gcc/gcc-5646
>>  and solve the problem that way or, on the other hand, they could
>> just continue FreeBSD's inexorable march towards Clang and get the
>> blocks support as part of compiler-rt.  The only problem seems to be
>> that the build support for Blocks in compiler-rt isn't wired up yet,
>> which came as something of a surprise to all involved given that
>> people have been talking about Clang and Blocks since this summer.
>>
>> Is there a roadmap for this anywhere that we can read?  If this  
>> simply
>> has not been done due to a lack of resources, the GCD porting folks
>> could perhaps help move this along, assuming they had appropriate
>> access to the bits.
>>
>> Thanks!
>>
>> - Jordan
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>
>
>
> -- 
> -- 
> Edward O'Callaghan
> http://www.auroraux.org/
> eocallaghan at auroraux dot org
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list