[llvm-dev] Minimal glibc version supported by LLVM build

Serguei Katkov via llvm-dev llvm-dev at lists.llvm.org
Wed Oct 4 00:08:26 PDT 2017


Hi All,

The landed patch https://reviews.llvm.org/D38481 introduced the usage of CPU_COUNT defined in glibc sched.h header.
I failed to find this symbol in sched.h of glibc version 2.5-24, so compilation just fails.
/home/dolphin/merge-from-upstream-area/ws/pristine/lib/Support/Threading.cpp: In function 'unsigned int llvm::hardware_concurrency()':
/home/dolphin/merge-from-upstream-area/ws/pristine/lib/Support/Threading.cpp:80:26: error: 'CPU_COUNT' was not declared in this scope
     return CPU_COUNT(&Set);
                          ^

It is buildable with newest version of glibc.
I tried to find a requirements for glibc version in LLVM documentation but failed.
So I wonder whether there is such requirement or not.
Could anyone point me to this documentation?

I'm trying to understand whether patch is wrong which relies on availability of library but does not check the symbol itself or this version of glibc is not supported.

Thank you,
Serguei.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171004/4b99c495/attachment.html>


More information about the llvm-dev mailing list