aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler-rt/lib/asan/CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler-rt/lib/asan/CMakeLists.txt b/compiler-rt/lib/asan/CMakeLists.txt
index 7d07ec7..459581f 100644
--- a/compiler-rt/lib/asan/CMakeLists.txt
+++ b/compiler-rt/lib/asan/CMakeLists.txt
@@ -108,7 +108,8 @@ set(ASAN_CFLAGS ${SANITIZER_COMMON_CFLAGS})
# Win/ASan relies on the runtime functions being hotpatchable. See
# https://github.com/llvm/llvm-project/pull/149444
-if(MSVC)
+# MSVC cl 64 bit architectures treat /hotpatch as an unknown option
+if(CLANG_CL OR (MSVC AND "i386" IN_LIST ASAN_SUPPORTED_ARCH))
list(APPEND ASAN_CFLAGS /hotpatch)
endif()