[libcxx-commits] [PATCH] D86411: [libunwind] Remove static_assert / __has_feature macros

Ryan Prichard via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Aug 24 04:55:38 PDT 2020


rprichard added a comment.

In D86411#2232638 <https://reviews.llvm.org/D86411#2232638>, @mstorsjo wrote:

> I guess this fix makes sense - I'd be surprised if we don't already require C++11 for building in general.

I see many uses of `auto` and `nullptr` in libunwind. In release/10.x, on targets using `dl_iterate_phdr`, AddressSpace.hpp used a lambda function.

The change that broke GCC builds (D86102 <https://reviews.llvm.org/D86102>) adds additional uses of `alignof`, which is also C++11 only. (The previous uses were in a test file.)

> However I do see that when building, the cmake project files don't seem to force building in C++11 mode (at least when building, I don't see any `-std=c++11` or similar), so this would break building with older versions of GCC that do support C++11 but still default to C++98, so I guess it'd be safest if we'd have something that enforces the version of C++ that actually is required.

When I built libunwind using GCC (for use with glibc), using libunwind/CMakeLists.txt, I saw ninja passing `-std=c++11` on the C++ compile command lines. I think it was caused by the `CXX_STANDARD 11` in libunwind/src/CMakeLists.txt (e.g. for unwind_shared <https://github.com/llvm/llvm-project/blob/6a44edb8da335bba355cd180a3f43564d14cd1be/libunwind/src/CMakeLists.txt#L135>). When I removed the `CXX_STANDARD 11` lines, I no longer saw `-std=c++11` on the command lines.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86411/new/

https://reviews.llvm.org/D86411



More information about the libcxx-commits mailing list