mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-27 13:30:05 +00:00
Prospective -fsanitize=memory build fix following r212586
This -f group flag appears to influence linker flags, breaking the usual rules and causing CMake's link invocation to fail during feature detection due to missing link dependencies (msan_*). Let's forcibly add it for now to get things the way they were before feature detection started working. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212590 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
215b35653a
commit
2bd8e0cde3
@ -343,12 +343,12 @@ if(LLVM_USE_SANITIZER)
|
||||
if (LLVM_ON_UNIX)
|
||||
if (LLVM_USE_SANITIZER STREQUAL "Address")
|
||||
append_common_sanitizer_flags()
|
||||
add_flag_or_print_warning("-fsanitize=address" FSANITIZE_ADDRESS)
|
||||
append("-fsanitize=address" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
|
||||
elseif (LLVM_USE_SANITIZER MATCHES "Memory(WithOrigins)?")
|
||||
append_common_sanitizer_flags()
|
||||
add_flag_or_print_warning("-fsanitize=memory" FSANITIZE_MEMORY)
|
||||
append("-fsanitize=memory" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
|
||||
if(LLVM_USE_SANITIZER STREQUAL "MemoryWithOrigins")
|
||||
add_flag_or_print_warning("-fsanitize-memory-track-origins" FSANITIZE_MEMORY_TRACK_ORIGINS)
|
||||
append("-fsanitize-memory-track-origins" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
|
||||
endif()
|
||||
else()
|
||||
message(WARNING "Unsupported value of LLVM_USE_SANITIZER: ${LLVM_USE_SANITIZER}")
|
||||
|
Loading…
Reference in New Issue
Block a user