[cfe-dev] Enable Block Support with Clang

Conrad Taylor conradwt at gmail.com
Thu Jan 21 20:39:53 PST 2010


Here's some additional information:

$ clang -v
clang version 1.1 (trunk 94144)
Target: powerpc-apple-darwin9
Thread model: posix

$ clang block.c
block.c:6:6: error: blocks support disabled - compile with -fblocks or pick
a deployment target that supports them
int (^myBlock)(int) = ^(int num) {
     ^
block.c:6:23: error: blocks support disabled - compile with -fblocks or pick
a deployment target that supports them
int (^myBlock)(int) = ^(int num) {
                      ^
2 diagnostics generated.

Also, I have tried the following without success:

$ clang -fblocks block.c
Undefined symbols:
  "__NSConcreteStackBlock", referenced from:
      __NSConcreteStackBlock$non_lazy_ptr in cc-c9MyZg.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
clang: error: linker command failed with exit code 1 (use -v to see
invocation)

-Conrad

On Thu, Jan 21, 2010 at 6:34 PM, Conrad Taylor <conradwt at gmail.com> wrote:

> Hi, I was wondering, what's the correct way to enable block support using
> Clang?  Is there a configure switch/option within LLVM/CLANG/COMPILER-RT?
>
>
> On Thu, Jan 21, 2010 at 6:32 PM, Conrad Taylor <conradwt at gmail.com> wrote:
>
>> Hi, I was wondering, what's the correct way to enable clock suppot using
>> Clang?  Is there a configure switch within LLVM/CLANG/COMPILER-RT?
>>
>> -Conrad
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100121/f10df8b0/attachment.html>


More information about the cfe-dev mailing list