[compiler-rt] 6853c49 - [compiler-rt] Do not redefine builtins in MinGW configs either

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 7 04:51:29 PDT 2023


Author: Martin Storsjö
Date: 2023-06-07T14:49:57+03:00
New Revision: 6853c49164d6c67f7d4d7e3fde9390c85167b624

URL: https://github.com/llvm/llvm-project/commit/6853c49164d6c67f7d4d7e3fde9390c85167b624
DIFF: https://github.com/llvm/llvm-project/commit/6853c49164d6c67f7d4d7e3fde9390c85167b624.diff

LOG: [compiler-rt] Do not redefine builtins in MinGW configs either

This fixes broken mingw builds since
0a71e25e2448ee471b1ebe74e910c5de9b9c82b4. Clang-cl style builds
were broken similarly, but were fixed in
caa2c1bacbd76c017ebbb4fd13861f0f66770299, with the comment
"Do not redefine builtins on Windows", even if the fix only affected
Clang-cl style builds.

Added: 
    

Modified: 
    compiler-rt/lib/sanitizer_common/sanitizer_redefine_builtins.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/sanitizer_common/sanitizer_redefine_builtins.h b/compiler-rt/lib/sanitizer_common/sanitizer_redefine_builtins.h
index 7bf27a5cdbcbb..6649ff5844f5c 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_redefine_builtins.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_redefine_builtins.h
@@ -15,7 +15,7 @@
 #define SANITIZER_REDEFINE_BUILTINS_H
 
 // The asm hack only works with GCC and Clang.
-#if !defined(_MSC_VER)
+#if !defined(_WIN32)
 
 asm("memcpy = __sanitizer_internal_memcpy");
 asm("memmove = __sanitizer_internal_memmove");
@@ -46,7 +46,7 @@ using unordered_set = Define_SANITIZER_COMMON_NO_REDEFINE_BUILTINS_in_cpp_file;
 using vector = Define_SANITIZER_COMMON_NO_REDEFINE_BUILTINS_in_cpp_file;
 }  // namespace std
 
-#endif  // !_MSC_VER
+#endif  // !_WIN32
 
 #endif  // SANITIZER_REDEFINE_BUILTINS_H
 #endif  // SANITIZER_COMMON_NO_REDEFINE_BUILTINS


        


More information about the llvm-commits mailing list