[compiler-rt] Use mmap/munmap for allocating memory in emutls when available. (PR #73946)

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 13 06:54:43 PST 2023


compnerd wrote:

Apologies, I didn't see the original request in all the GitHub messages.


I think that this is adding a lot of complexity for replacing the memory allocator which can already be done by providing an implementation of `malloc`/`free`.  This increases the dependency on libc further complicating bootstrapping.  Can we instead not provide shims as we did through `malloc`?  For most use cases, emutls must be built into a DSO as static linking is incompatible with dynamically linked environments as you need to single global set of locks.  The only way to statically link this is to have a completely statically linked executable where glibc cannot be used as the libc.

https://github.com/llvm/llvm-project/pull/73946


More information about the llvm-commits mailing list