[compiler-rt] [compiler-rt] Add a prefix on the windows mmap symbols (PR #78037)

Petr Hosek via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 17 15:33:37 PST 2024


petrhosek wrote:

While this solution works, it feels a bit hacky. I'd rather avoid using the standard POSIX names in the profile runtime implementation and instead provide our own runtime specific functions. Specifically, I'd define `__llvm_profile_mmap` etc. in `compiler-rt/lib/profile/InstrProfilingInternal.h` (or perhaps `lprofMmap`, we don't seem to be very consistent namewise). On Windows, we would use the existing polyfill implementation from `compiler-rt/lib/profile/WindowsMMap.h`. On POSIX systems we would just implement this as a simple wrapper around `mmap` (on ELF based systems it could be an alias).

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


More information about the llvm-commits mailing list