[libc-commits] [PATCH] D147985: [LIBC] Implement `sched_yield()`
David Finkelstein via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Apr 11 14:13:17 PDT 2023
dxf added a comment.
> As an aside, are you planning to implement anything along the lines of gnu `ifunc`? If not is the method
> for arch-specific just with higher isa builds and compiler flags (i.e `#ifdef __AVX2__` and stuff like that).
Yes, the method is to build with architecture-specific flags. You can see examples of this in files like https://github.com/llvm/llvm-project/blob/main/libc/src/string/memory_utils/op_x86.h and https://github.com/llvm/llvm-project/blob/main/libc/src/math/generic/sinf.cpp
The model is to consider the libc functions as just another part of your application code that gets statically linked in. So you build the libc with the same optimization level, sanitizers, architecture defines, etc. you build your application with, and then deploy appropriately.
> Also are you guys planning on implementing dynamic loader?
At some point, though it's not a current area of investment for anyone. If this is an area that interests you, patches are welcome!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147985/new/
https://reviews.llvm.org/D147985
More information about the libc-commits
mailing list