[CMake] Enable building with UBSAN + clang-cl on windows.
authorPierre Gousseau <pierre.gousseau@sony.com>
Tue, 13 Jun 2023 09:14:40 +0000 (10:14 +0100)
committerPierre Gousseau <pierre.gousseau@sony.com>
Tue, 13 Jun 2023 09:17:49 +0000 (10:17 +0100)
commit56bf960629cb5accf0584b1aabb1a4d8191249d1
tree8d0651a35669cda4cfa1c4c83904f5e8f98fe934
parenta70d5e25f32ebd5f1d1c394312036a37591e998b
[CMake] Enable building with UBSAN + clang-cl on windows.

Currently both ASAN and UBSAN are supported on Windows but only ASAN is enabled in LLVM build system. This patch enables the option to build LLVM with UBSAN on windows.

Tested with clang-cl released in LLVM16.

Submitting on behalf of @dwang.

Reviewed by: andrewng, pgousseau

Differential Revision: https://reviews.llvm.org/D151511
llvm/cmake/modules/HandleLLVMOptions.cmake
llvm/include/llvm/ADT/EpochTracker.h
llvm/include/llvm/ADT/SmallPtrSet.h
llvm/include/llvm/ADT/StringMap.h
llvm/include/llvm/Support/AllocatorBase.h