[libc-commits] [libc] [libc] Implement 'atexit' on the GPU correctly (PR #83037)
via libc-commits
libc-commits at lists.llvm.org
Mon Feb 26 12:03:56 PST 2024
lntue wrote:
> > Can you split the GPU's `atexit` implementation to `src/stdlib/gpu/atexit.cpp` similar to `malloc` and `free` there? So that they won't have maybe-unused non-overlapping dependency.
>
> Somewhat of a pain because it required adding some "generic/" directory only for a single file.
You don't need the `generic` folder for that. I'm thinking more about putting `atexit` entry point creation under the switch https://github.com/llvm/llvm-project/blob/main/libc/src/stdlib/CMakeLists.txt#L400, where you simply alias it with the `.gpu.atexit` target when building for GPU.
https://github.com/llvm/llvm-project/pull/83037
More information about the libc-commits
mailing list