[llvm] 890e3c5 - [llvm][ubsan] Inclusive language: replace use of blacklist HandleLLVMOptions.cmake but use old option name

Zarko Todorovski via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 25 07:23:20 PST 2021


Author: Zarko Todorovski
Date: 2021-11-25T10:23:14-05:00
New Revision: 890e3c55b5d4900eadda98b7a20c74cdd0fa4507

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

LOG: [llvm][ubsan] Inclusive language: replace use of blacklist HandleLLVMOptions.cmake but use old option name

Retry at https://reviews.llvm.org/D113689, this time with using the old option name
to support older versions of clang.

Reviewed By: bjope

Differential Revision: https://reviews.llvm.org/D114033

Added: 
    llvm/utils/sanitizers/ubsan_ignorelist.txt

Modified: 
    llvm/cmake/modules/HandleLLVMOptions.cmake

Removed: 
    llvm/utils/sanitizers/ubsan_blacklist.txt


################################################################################
diff  --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index 54eebb8d6b454..0280e1746ab04 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -870,9 +870,11 @@ if(LLVM_USE_SANITIZER)
     append("-fsanitize=fuzzer-no-link" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
   endif()
   if (LLVM_USE_SANITIZER MATCHES ".*Undefined.*")
-    set(BLACKLIST_FILE "${CMAKE_SOURCE_DIR}/utils/sanitizers/ubsan_blacklist.txt")
-    if (EXISTS "${BLACKLIST_FILE}")
-      append("-fsanitize-blacklist=${BLACKLIST_FILE}"
+    set(IGNORELIST_FILE "${CMAKE_SOURCE_DIR}/utils/sanitizers/ubsan_ignorelist.txt")
+    if (EXISTS "${IGNORELIST_FILE}")
+      # Use this option name version since -fsanitize-ignorelist is only
+      # accepted with clang 13.0 or newer.
+      append("-fsanitize-blacklist=${IGNORELIST_FILE}"
              CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
     endif()
   endif()

diff  --git a/llvm/utils/sanitizers/ubsan_blacklist.txt b/llvm/utils/sanitizers/ubsan_ignorelist.txt
similarity index 100%
rename from llvm/utils/sanitizers/ubsan_blacklist.txt
rename to llvm/utils/sanitizers/ubsan_ignorelist.txt


        


More information about the llvm-commits mailing list