[libc-commits] [PATCH] D119789: [libc] change ASAN condition to generator expression
Michael Jones via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon Feb 14 15:50:01 PST 2022
michaelrj updated this revision to Diff 408657.
michaelrj added a comment.
switch to TARGET_NAME_IF_EXISTS
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119789/new/
https://reviews.llvm.org/D119789
Files:
libc/src/stdlib/CMakeLists.txt
Index: libc/src/stdlib/CMakeLists.txt
===================================================================
--- libc/src/stdlib/CMakeLists.txt
+++ libc/src/stdlib/CMakeLists.txt
@@ -199,16 +199,14 @@
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
+ $<TARGET_NAME_IF_EXISTS:RTGwpAsan.${LIBC_TARGET_ARCHITECTURE}>
+ $<TARGET_NAME_IF_EXISTS:RTGwpAsanBacktraceLibc.${LIBC_TARGET_ARCHITECTURE}>
+ $<TARGET_NAME_IF_EXISTS:RTGwpAsanSegvHandler.${LIBC_TARGET_ARCHITECTURE}>)
add_entrypoint_external(
malloc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119789.408657.patch
Type: text/x-patch
Size: 1451 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20220214/28be4075/attachment.bin>
More information about the libc-commits
mailing list