[PATCH] D58682: Add secondary libstdc++ 4.8 and 5.1 detection mechanisms

JF Bastien via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 4 11:19:35 PST 2019


jfb accepted this revision.
jfb added a comment.
This revision is now accepted and ready to land.

I'm not a fan of this type of detection, but unfortunately it's the best we have for now. Can you add a comment to that effect, and mention that when we go to GCC 7.1 or later we'll be able to use a better solution because of this;

> `_GLIBCXX_RELEASE`
>  The major release number for libstdc++. This macro is defined to the GCC major version that the libstdc++ headers belong to, as an integer constant. When compiling with GCC it has the same value as GCC's pre-defined macro `__GNUC__`. This macro can be used when libstdc++ is used with a non-GNU compiler where `__GNUC__` is not defined, or has a different value that doesn't correspond to the libstdc++ version. This macro first appeared in the GCC 7.1 release and is not defined for GCC 6.x or older releases.

I can't validate your heuristics, but I assume they're correct.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D58682





More information about the llvm-commits mailing list