[compiler-rt] fc011a7 - Fix "[compiler-rt] Avoid memintrinsic calls inserted by the compiler"

Marco Elver via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 2 07:28:48 PDT 2023


Author: Marco Elver
Date: 2023-06-02T16:25:32+02:00
New Revision: fc011a72881cdddc95bfa61f3f38916c29b7e362

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

LOG: Fix "[compiler-rt] Avoid memintrinsic calls inserted by the compiler"

The tests already depend on libc through various dependencies. In
addition, including C++STL inline functions may lead to ODR violations
where one version uses sanitizer_common's internal_mem*() functions, and
the other the normal memintrinsics.

Added: 
    

Modified: 
    compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt b/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
index 40aa8e703b6c7..2b853722603dc 100644
--- a/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
+++ b/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
@@ -69,6 +69,7 @@ set(SANITIZER_TEST_CFLAGS_COMMON
   -I${COMPILER_RT_SOURCE_DIR}/include
   -I${COMPILER_RT_SOURCE_DIR}/lib
   -I${COMPILER_RT_SOURCE_DIR}/lib/sanitizer_common
+  -DSANITIZER_COMMON_NO_REDEFINE_BUILTINS
   -fno-rtti
   -O2
   -Werror=sign-compare


        


More information about the llvm-commits mailing list