list(REMOVE_DUPLICATES all_deps)
set(objects "")
foreach(dep IN LISTS all_deps)
- list(APPEND objects $<TARGET_OBJECTS:${dep}>)
+ list(APPEND objects $<$<STREQUAL:$<TARGET_NAME_IF_EXISTS:${dep}>,${dep}>:$<TARGET_OBJECTS:${dep}>>)
endforeach(dep)
add_library(
message(FATAL_ERROR "Architecture ${LIBC_TARGET_ARCHITECTURE} is not supported by SCUDO.
Either disable LLVM_LIBC_INCLUDE_SCUDO or change your target architecture.")
endif()
- list(APPEND SCUDO_DEPS RTScudoStandalone.${LIBC_TARGET_ARCHITECTURE}
- RTScudoStandaloneCWrappers.${LIBC_TARGET_ARCHITECTURE})
- if((LIBC_TARGET_ARCHITECTURE IN_LIST ALL_GWP_ASAN_SUPPORTED_ARCH)
- AND COMPILER_RT_BUILD_GWP_ASAN)
- list(APPEND SCUDO_DEPS RTGwpAsan.${LIBC_TARGET_ARCHITECTURE}
- RTGwpAsanBacktraceLibc.${LIBC_TARGET_ARCHITECTURE}
- RTGwpAsanSegvHandler.${LIBC_TARGET_ARCHITECTURE})
- elseif(COMPILER_RT_BUILD_GWP_ASAN)
- message(WARNING "Architecture ${LIBC_TARGET_ARCHITECTURE} is not supported by GWP-ASan. Skipping.")
- endif()
+ list(APPEND SCUDO_DEPS RTScudoStandalone.${LIBC_TARGET_ARCHITECTURE}
+ RTScudoStandaloneCWrappers.${LIBC_TARGET_ARCHITECTURE})
+
+ list(APPEND SCUDO_DEPS
+ RTGwpAsan.${LIBC_TARGET_ARCHITECTURE}
+ RTGwpAsanBacktraceLibc.${LIBC_TARGET_ARCHITECTURE}
+ RTGwpAsanSegvHandler.${LIBC_TARGET_ARCHITECTURE}
+ )
+
add_entrypoint_external(
malloc
DEPENDS