[libc-commits] [PATCH] D114037: [libc] fix default ASAN behavior when SCUDO is enabled

Michael Jones via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Nov 16 15:23:41 PST 2021


michaelrj created this revision.
michaelrj added reviewers: sivachandra, lntue.
Herald added subscribers: libc-commits, ecnelises, tschuett, mgorny.
Herald added a project: libc-project.
michaelrj requested review of this revision.

if COMPILER_RT_BUILD_GWP_ASAN isn't set, then in compiler-rt it defaults
to on, but since it isn't defined in llvm libc, it was previously
defaulting to off, causing build errors from the mismatch. This fixes
the default behavior by making it default to on in llvm libc.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114037

Files:
  libc/CMakeLists.txt


Index: libc/CMakeLists.txt
===================================================================
--- libc/CMakeLists.txt
+++ libc/CMakeLists.txt
@@ -77,6 +77,9 @@
   if (NOT "compiler-rt" IN_LIST LLVM_ENABLE_PROJECTS)
     message(FATAL_ERROR "SCUDO cannot be included without adding compiler-rt to LLVM_ENABLE_PROJECTS")
   endif()
+  if(NOT DEFINED COMPILER_RT_BUILD_GWP_ASAN)
+    set(COMPILER_RT_BUILD_GWP_ASAN ON)
+  endif()
 endif()
 
 include(CMakeParseArguments)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114037.387774.patch
Type: text/x-patch
Size: 469 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20211116/d5a8fe5c/attachment.bin>


More information about the libc-commits mailing list