[libcxx patch] Let module.modulemap require cxx_atomics for the atomics module

Nico Weber thakis at chromium.org
Tue Sep 23 16:12:11 PDT 2014


On Tue, Sep 23, 2014 at 3:49 PM, Richard Smith <richard at metafoo.co.uk>
wrote:

> On Fri, Sep 19, 2014 at 6:35 PM, Nico Weber <thakis at chromium.org> wrote:
>
>> Hi,
>>
>> when using modules in c++98, libc++ currently fails to build:
>>
>> While building module 'std' imported from src/disk_interface.h:18:
>> In file included from <module-includes>:3:
>> /Users/thakis/src/chrome/src/third_party/llvm-build/Release+Asserts/bin/../include/c++/v1/atomic:539:2:
>> error: <atomic> is not implemented
>> #error <atomic> is not implemented
>>  ^
>> In file included from src/disk_interface.cc:15:
>> src/disk_interface.h:18:10: fatal error: could not build module 'std'
>> #include <map>
>>  ~~~~~~~~^
>>
>> The attached patch fixes this by making atomic depend on cxx_atomics.
>> Fixes PR21002.
>>
>
> Doesn't this just make the atomic submodule always unavailable? We don't
> have a cxx_atomics feature, as far as I can see. And cxx_atomic (the
> corresponding __has_feature flag) wouldn't work either: module features are
> not the same as __has_feature features (see the relevant documentation
> here: http://clang.llvm.org/docs/Modules.html#requires-declaration).
> cplusplus11 is the best check we have for this.
>

Aw, bummer. Is the patch ok with s/cxx_atomics/cplusplus11/?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140923/542e6f03/attachment.html>


More information about the cfe-commits mailing list