Tested with MSVC 2019 (19.29) and LLVM 14.0.4.
Details
Diff Detail
Event Timeline
llvm/cmake/modules/HandleLLVMOptions.cmake | ||
---|---|---|
897 | They may even possibly not have a suffix at all if the clang toolchain has per target runtime directories. In that case it is eg. called just clang_rt.asan.lib on my machine. So this seems like if we want it to actually handle all possible options we'll have to loop and check for the existence of those files. |
llvm/cmake/modules/HandleLLVMOptions.cmake | ||
---|---|---|
827 | I just kept this the same as it was but you're right it is x86_32 specific. Do you want me to address this? | |
897 | Thanks for the comments. I have assumed x86_64 as I believe that's the most commonly used. I deliberately titled this patch "improve" as my goal wasn't really to attempt to cope with every possible configuration. Is this acceptable? Perhaps it can be improved incrementally for other desired configurations. |
llvm/cmake/modules/HandleLLVMOptions.cmake | ||
---|---|---|
897 | Doing it incrementally sounds good to me, but in the current state it would break existing configurations, so it wouldn't just be an improvement but an regression as well. |
llvm/cmake/modules/HandleLLVMOptions.cmake | ||
---|---|---|
897 | The addition of the ASAN libraries was never setup before when lld-link is being used. Are you saying that there are configurations that don't require this and therefore by adding these libraries, it would break those configurations? Could you shed some light on such configurations? If there's another way to make ASAN work without modifying the CMake, then perhaps that's the way to go. |
lgtm
llvm/cmake/modules/HandleLLVMOptions.cmake | ||
---|---|---|
827 | There's probably a better way to check the architecture, but I'm not sure what it is and this seems good enough. |
This isn't clang-specific, it's x86_32-specific.