[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:19:36 PST 2022
michaelrj created this revision.
michaelrj added a reviewer: sivachandra.
Herald added subscribers: libc-commits, ecnelises, tschuett, cryptoad, mgorny.
Herald added a project: libc-project.
michaelrj requested review of this revision.
Previously, building LLVM-libc with GWP ASAN was conditioned on the flag
COMPILER_RT_BUILD_GWP_ASAN, which caused issues do to the default value
of the flag being set in the compiler-rt cmake, which is seperate. Now
GWP ASAN is included based on if it exists as a target, which is more
consistent.
Repository:
rG LLVM Github Monorepo
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,15 +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 RTScudoStandalone.${LIBC_TARGET_ARCHITECTURE}
+ RTScudoStandaloneCWrappers.${LIBC_TARGET_ARCHITECTURE})
+
+ if($<TARGET_EXISTS:RTGwpAsan.${LIBC_TARGET_ARCHITECTURE}>)
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()
add_entrypoint_external(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119789.408642.patch
Type: text/x-patch
Size: 1246 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20220214/2d26f493/attachment.bin>
More information about the libc-commits
mailing list