[Patch] use __BLOCKS__ in asan_mac.cc to detect blocks availability

Alexander Potapenko glider at google.com
Wed Nov 6 20:28:34 PST 2013


Ah, I see. You're using GCC, which doesn't support blocks, to host Clang
and build the ASan runtime.
I don't think this is a configuration we want to support. As a result
you'll get the runtime with missing blocks support, which won't pass the
GCD tests (have you tried 'make check-asan' for the resulting Clang?)
On Nov 7, 2013 7:52 AM, "Alexander Potapenko" <glider at google.com> wrote:

> Are there situations when blocks support is missing in Clang?
> On Oct 11, 2013 1:43 AM, "Iain Sandoe" <iain at codesourcery.com> wrote:
>
>> Hi,
>>
>> I found today (on OSX10.8) that with cmake using gcc-4.8 as the bootstrap
>> I was getting a fail building asan-mac.cc, related to use of blocks syntax.
>>  The same checkout builds fine using autoconf/make.
>>
>> In asan-mac.cc, availability of blocks is currently tested by
>> !defined(MISSING_BLOCKS_SUPPORT) - which is apparently not set in the cmake
>> process - the attached trivial patch changes this to use
>> "defined(__BLOCKS__)" instead.
>>
>> The same checkout now builds with both gcc-4.8 and clang for both 'cmake'
>> and 'configure' (LLVM, clang and compiler-rt).
>>
>> Iain
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131107/328c6f4f/attachment.html>


More information about the llvm-commits mailing list