[compiler-rt] [rtsan] Add include guards around posix interceptors, tests (PR #113188)
Chris Apple via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 21 09:19:32 PDT 2024
cjappl wrote:
> Is there strong motivation for doing this in the source rather than in the CMake configuration?
There seems to be strong precedent to do it via ifdefs. Take for instance the platform specific malloc files in asan:
https://github.com/llvm/llvm-project/blob/54c93aabec965469fe7db1f4391a190e3d640feb/compiler-rt/lib/asan/asan_malloc_mac.cpp#L15
https://github.com/llvm/llvm-project/blob/54c93aabec965469fe7db1f4391a190e3d640feb/compiler-rt/lib/asan/asan_malloc_win.cpp#L16
https://github.com/llvm/llvm-project/blob/54c93aabec965469fe7db1f4391a190e3d640feb/compiler-rt/lib/asan/asan_malloc_linux.cpp#L17
I'm not opposed to doing this in CMake (and it would be my first gut reaction in a project I controlled) but this seems to be the way I've seen around the codebase.
https://github.com/llvm/llvm-project/pull/113188
More information about the llvm-commits
mailing list