[compiler-rt] caa2c1b - [compiler-rt] Do not redefine builtins on Windows

Marco Elver via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 08:35:40 PDT 2023


Author: Marco Elver
Date: 2023-06-06T17:33:49+02:00
New Revision: caa2c1bacbd76c017ebbb4fd13861f0f66770299

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

LOG: [compiler-rt] Do not redefine builtins on Windows

Build bots are still failing, and getting it to work on Windows should
be done in a separate patch, should this even be technically feasible.

 | lld-link: error:
 | stage2_win_x64/obj/compiler-rt/lib/asan/asan_shared_library.asan_activation.obj:
 | memcpy should not refer to special section 0

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 9910ae7729960..7bf27a5cdbcbb 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) || defined(__clang__)
+#if !defined(_MSC_VER)
 
 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 || __clang__
+#endif  // !_MSC_VER
 
 #endif  // SANITIZER_REDEFINE_BUILTINS_H
 #endif  // SANITIZER_COMMON_NO_REDEFINE_BUILTINS


        


More information about the llvm-commits mailing list