[PATCH] Support/Unix: use lambda function to fix building errors with clang

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 27 01:35:02 PDT 2018


On Sat, Aug 25, 2018 at 1:22 PM, Mauro Rossi <issor.oruam at gmail.com> wrote:
> Hi Pavel,
>
> Il giorno mar 17 lug 2018 alle ore 08:36 Mauro Rossi
> <issor.oruam at gmail.com> ha scritto:
>>
>> Hi Pavel,
>>
>> Il giorno lun 16 lug 2018 alle ore 19:14 Pavel Labath <labath at google.com> ha scritto:
>>>
>>> I think all/most systems have open(2) defined as a variadic (...)
>>> function, so that can't be the only reason why this is failing for
>>> you. There must be something more which is specific to your platform.
>>> Nevertheless, the workaround is not bad, so there's no harm in
>>>
>>> changing this. Some people would even prefer the lambda based syntax.
>>
>>
>> We are using basically the same Build System/compilers of AOSP,
>> it seam that just using clang can produce the error because of behavior different from gcc.
>> In some comments in the web behaviors of gcc and clang were described as different.
>>
>> If you are also using clang, are you using the clang version with AOSP (8.1.0_r33 at the time of reporting)
>> I propose to check in order to identify root cause, then evaluate how to proceed.
>>
>> Mauro
>
> The building error is happening using default AOSP 8.1.0_r41 clang tool chain

Can you print the "clang --version" output of that toolchain? If we
fix this, it would be good to put a comment about what compiler was
having a problem.

> If you don't see drawbacks, would it be possible to queue the patch
> that solves the building problem
> as candidate for llvm 7.0rc3?
> This would prevent building issues for AOSP current and future Android releases
>
> After your feedback, I am adding Hans Wennborg to evaluate if the
> patch is an acceptable candidate for llvm 7.0rc3

I'm OK with this, but the patch would have to land soon.

Thanks,
Hans


More information about the llvm-commits mailing list