A few small changes required to permit building the sanitizers
with Clang instead of only with MSVC.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
I don't actively work on ASan anymore.
Did you make sure all the ASan tests pass when the RTL is complied this way? I remember there was *some* reason why this wasn't enabled before. It is possible that the last time it was evaluated was a long time ago, when Clang/Win wasn't mature enough though.
This already works if you use clang-cl. Is this about making things work in a mingw environment?
While the current form works for clang-cl, this change is necessary if you want to use the gcc-compatible driver in clang when targeting windows.
cmake/config-ix.cmake | ||
---|---|---|
418 ↗ | (On Diff #69882) | I think what we really want to say here is "we support the MS CRT, not the mingw CRT". The check as written will enable building asan for mingw, and that would break their builds. I don't know how to ask that CRT question in cmake though... |
cmake/config-ix.cmake | ||
---|---|---|
418 ↗ | (On Diff #69882) | The only way that I can see how to phrase that is to use the COMPILER_RT_TARGET and rip the environment from that. The gnu and cygnus environments are the one with their own CRT and msvc and itanium use the Microsoft CRT. |
Minor thing, otherwise let's do it.
lib/asan/CMakeLists.txt | ||
---|---|---|
217 ↗ | (On Diff #70581) | I think clang-cl identifies as clang and MSVC is true, so you want to do if (MSVC) first. |