Skip to content

Commit 40e27eb

Browse files
authored
azure-pipelines: Fix the fact that neither asan+ubsan were not actually enabled (#6428)
Also make the message about the unsupported value of LLVM_USE_SANITIZER an error rather than a warning, so we don't make this mistake in the future.
1 parent dab30b9 commit 40e27eb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ stages:
5353
configuration: Release
5454
CC: clang
5555
CXX: clang++
56-
CMAKE_OPTS: -DLLVM_ENABLE_WERROR=On -DLLVM_USE_SANITIZER=Address,Undefined -DLLVM_ENABLE_LIBCXX=On -DLLVM_USE_LINKER=lld
56+
CMAKE_OPTS: -DLLVM_ENABLE_WERROR=On -DLLVM_USE_SANITIZER='Address;Undefined' -DLLVM_ENABLE_LIBCXX=On -DLLVM_USE_LINKER=lld
5757
CHECK_ALL_ENV: ASAN_OPTIONS=alloc_dealloc_mismatch=0
5858
OS: Linux
5959
Linux_Clang_Debug:

cmake/modules/HandleLLVMOptions.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,13 +535,13 @@ if(LLVM_USE_SANITIZER)
535535
append("-fsanitize=address,undefined -fno-sanitize=vptr,function,alignment -fno-sanitize-recover=all"
536536
CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
537537
else()
538-
message(WARNING "Unsupported value of LLVM_USE_SANITIZER: ${LLVM_USE_SANITIZER}")
538+
message(FATAL_ERROR "Unsupported value of LLVM_USE_SANITIZER: ${LLVM_USE_SANITIZER}")
539539
endif()
540540
else()
541541
if (LLVM_USE_SANITIZER STREQUAL "Address")
542542
append("-fsanitize=address" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
543543
else()
544-
message(WARNING "Unsupported value of LLVM_USE_SANITIZER: ${LLVM_USE_SANITIZER}")
544+
message(FATAL_ERROR "Unsupported value of LLVM_USE_SANITIZER: ${LLVM_USE_SANITIZER}")
545545
endif()
546546
endif()
547547
if (LLVM_USE_SANITIZE_COVERAGE)

0 commit comments

Comments
 (0)